|
From: Chris N. <pu...@po...> - 2001-04-12 17:43:19
|
At 20:10 +0200 2001.04.12, as...@en... wrote:
>I'm wondering where to switch on the 'magic' variable, which appears at the
>beginning of the displaystory template to toggle whether a story's section
>gets displayed as part of its title. I'd like to have it off for individual
>articles and particular indexes, but on for the front page, where stories
>appear from various sections. I can't think how best to do this. How can
>displaystory know when it's being called from the front page?
Well, you can just add that logic to the template itself. For example, you
have now:
[% IF magic;
title = "...";
ELSE;
title = story.title;
END %]
You can add on top of that:
[% IF foo == 1;
magic = 1;
ELSE;
magic = 0;
END %]
However, I am not sure what you want to do, exactly. It looks like the
behavior you want is the behavior that it has right now. How exactly would
you want to change the behavior?
Although now that I look at it, the code in dispStory() looks busted. It
looks like:
magic => (!$full && index($story->{title}, ':') == (-1
&& ($story->{section} ne $constants->{defaultsection})
&& ($story->{section} ne $form_section))),
But should be this:
magic => (!$full && index($story->{title}, ':') == -1
&& ($story->{section} ne $constants->{defaultsection})
&& ($story->{section} ne $form_section)),
Anyway, if you can help me out with your needs, maybe we can figure it out.
--
Chris Nandor pu...@po... http://pudge.net/
Open Source Development Network pu...@os... http://osdn.com/
|