I'm wondering if anyone's tried to use secondary/tertiary topics for
What we are experimenting with is the ability to typify a story, such
that the layout in a skin for a particular section that would contain
such stories could key on "the types of stories" when it shows the
story-list to the user.
Some examples of possible story types:
1) features ( don't think of this in the sense of
2) message from the editor
3) message from a contributtor
The thought behind the design of a solution was that one could assign
a story a topic, and each topic is representative of each "story
type". Since you can have 1-N number of topics, and topics do not
necessarily have to have a parent/topic relationship, you could
probably use the topic structure to represent all sorts of things.
The solution I came up with was to modify the page plugin to do
something like the following:
1. setup a bogus/test topic tree w/ nexus.
tid 19: "these articles", is a nexus, has a skin attached to it
tid 45: child of 19, at weight 10, name "features"
tid 46: child of 19, at weight 10, name "departmental"
2. modify page.pl
in it's index template:
[% #misc.count = 5;
misc.secondarytopic = 45;
stories = index.displayStoriesByTitle(form.section,misc);
PROCESS titlebar title="Features";
FOREACH story = stories %]
[% story.widget %]
3. modify page.pm's displayStories
What I found out is that the page plugin, unlike index.pl and
dispStory, doesn't obtain any story_topics_rendered data. So I had to
make it fetch that, then check the rendered topics for the story. If
one of the rendered topics is that misc.secondarytopic, then return
the story to the template, which'll eventually show it in the loop.
While all this seems fairly simple, it took me a day or so of toying
with it to get it working. Most of that was because of laziness over
the past few years of just not quite ever putting the effort into
learning how the topic weights and relationships work.
So here are my questions:
1. Have any of you had such a need/want to do this?
If so, what solution did you come up with for doing it?
2. Is this considered a "misuse" of the topic system? Would I be
better off defining a few string_params such that the article type is
a pulldown in the story editor and the story.type is stored as a
3. Why is a tid >10k treated differently?
The interesting thing here is that there havve been a few requests
for 'sticky stories' over the past few years (where you define a
story as being sticky, and then it stays at the top of the page that
it's supposed to render in). One could create a stickybit topic, and
then assign a story to that. Modify the index;index;default template
to first show the story with the sticky bit, then show the rest.
I don't know if this is more appropriate of the slash-devel list, but
the traffic to it seems to be null and void, and I figure the sticky
topics and story typifying might interest non-coders so I'm sending
this to the non-dev list.
My slashcode stuff: http://slash.lottadot.com/
Slashcode faq: http://slash.lottadot.com/slash-faq
How to ask a question: http://www.catb.org/~esr/faqs/smart-