From: Gaulin, M. <mg...@gl...> - 2005-04-20 20:57:07
|
[sorry for the long post, but I'm trying to be thorough with my = explanation...]=20 We have a topic whose stories should sometimes appear on the mainpage, = and sometimes not. I figured we could just use the Story Topics editor = section ("-^- Mainpage -^-", etc) to remove MainPage from the stories = that shouldn't appear there, but it's not working out that way... the = story_topics_rendered table always has the child topic id AND the = mainpage topic id, even when mainpage is manually deleted. Looking at the code, renderTopics(), called by = setStoryRenderedFromChosen(), is correctly getting the single child = topic id as input, but then returns a list of topics that includes = mainpage. The child topic in question is a direct child of the Mainpage topic, and = has a min weight of 10. After reading the comments and code in = renderTopics(), I decided that increasing the min weight from 10 to 40 = ought to do the trick (since it looks like the starting weight for the = selected topic is 20, and 20 < 40 so it should not climb up the tree). = That worked, part way...=20 With this configuration the story_topics_rendered matches = story_topics_chosen (doesn't include MainPage), but the story doesn't = display anywhere because the primaryskid is 0. A quick read of = getPrimarySkidFromRendered() shows why: my lone selected child topic is = not a nexus, and even if it was a nexus, it probably wouldn't have it's = own skin (since I don't need a special host name or index file, and what = else do you use a skin for?), so that wouldn't make the cut either. (If = I manually change the primaryskid of the story then it appears exactly = the way I want it to.) I'm getting the feeling that to do what I want I would need to insert a = nexus topic between my child topic and the mainpage topic, and I would = need that nexus topic to have a skin (and I'd have to mess with the min = weight thing as above). Also, I can't make my original child topic a = nexus because the story submission page hides nexus topics from the list = of topics to choose from, hence the need for a new topic to be the = nexus. Does this sound right to you? Seems like a lot of dinking around to = me... I'm half-tempted to change getPrimarySkidFromRendered() so it = returns the default primary skid instead of returning 0, but I don't = know what that would break. Thanks Mark |
From: Shane <sh...@lo...> - 2005-04-21 11:58:01
|
On Apr 20, 2005, at 4:55 PM, Gaulin, Mark wrote: > what else do you use a skin for? different templates different linkrel (to be specific)... meta data, page title, css that's why I use skins, for the most part... to differentiate the meta data, and the css for cosmetics. -- http://shane.lottadot.com/ |
From: Shane <sh...@lo...> - 2005-04-21 12:03:53
|
On Apr 20, 2005, at 4:55 PM, Gaulin, Mark wrote: > [sorry for the long post, but I'm trying to be thorough with my > explanation...] > > We have a topic whose stories should sometimes appear on the mainpage, > and sometimes not. I figured we could just use the Story Topics editor > section ("-^- Mainpage -^-", etc) to remove MainPage from the stories > that shouldn't appear there, but it's not working out that way... the > story_topics_rendered table always has the child topic id AND the > mainpage topic id, even when mainpage is manually deleted. Now, first off, forgive me, I've been on an Xcode/Cocoa kick lately, so I've not touched anything-slash-related for quite some time, my memory may suck. Anyway, generally when I do a new story I see the interface with the - and +, and it starts with --------------- | ^Mainpage^ | | ^Sectional^ | --------------- If I add a topic to that story, and that topic has a parent of 'index', but I don't want this particular story to show up on the mainpage-index, I think all I've ever done is use the +/- key to shift that topic down in the order. Such that when I'm done, it is under ^Sectional^. What version of Slash are you running? It would be interesting to see your topic hierarchy with direct references to the actual topic that you are trying to do this with. Shane -- My slashcode stuff: http://slash.lottadot.com/ |