|
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
|