[prev in list] [next in list] [prev in thread] [next in thread]
List: bricolage-general
Subject: Re: using the related_subs parameter in the story_list.mc template
From: "David E. Wheeler" <david () kineticode ! com>
Date: 2008-02-12 22:58:54
Message-ID: 618F2C86-B993-4E31-8F59-044EFBC5006D () kineticode ! com
[Download RAW message or body]
On Feb 12, 2008, at 09:49, Dawn Buie wrote:
> Hi all -
>
> I've been taking advantage of the many wonderful sorting
> possibilities of the story_list.mc and keyword_list.mc templates in
> a recent project.
>
> I have a story template that has a 'related_story_box' container
> which in turn contains a related_story_link subelement. I want to
> show these manually related links in this box on this story, in
> addition I want to show up to 5 more stories that share keywords
> with the story currently being burned.
>
> I assumed if I added 'related_story_link' as a ' related_subs'
> parameter in the story_list.mc, those stories would be excluded from
> the results.
That is true if the calling template is for the related_story_box.
> However I'm getting duplicate results on the same story if I
> manually associate a related story *and* that same story has
> keywords in common with my existing story.
That will happen if you call story_list.mc from any other element
template.
> Here's my query:
>
> my @keyword_features = $m->comp(
> '/util/story_list.mc',
> max => 5,
> story_types => 'feature',
> which_keywords => 'story', #the params passed to /util/
> keyword_list.mc
> by_cover_date => 0,
> related_subs => 'related_story_link',
> );
I think that `related_subs` needs to be an array reference:
related_subs => ['related_story_link'],
> If I add the 'exclude_ids' parameter and feed it the value for a
> list of the 'related_story_link' s ids that does the trick too - but
> I just want to make sure I'm understanding the intention behind the
> 'related_sub' parameter because it would be so much neater to use
> it. I also want to make sure this is not a bug.
It is a bug if, once you adjust as above, it still doesn't work.
HTH,
David
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic