Mailing List Archive

[Bricolage-General] "story" vs "cover"
Hi All,

I am trying to figure out how I can tell the difference between a cover
and a story.
I am generating a "bread crumb" and I only want to output the title of
the story if it is in fact of "story" type.
I am doing this in the autohandler:

<snip>

% if ($story->get_primary_category->ancestry_dir !~ /^\/home/
% && $story->get_primary_category &&
$story->get_primary_category->get_name ne 'Root Category') {
&nbsp;&gt;&nbsp;
<a href="<% $story->get_primary_category->ancestry_dir %>/"
class="bread">
<% $story->get_primary_category->get_name %></a>
% }

</snip>

I looked thru the perldocs, but i didn't see anything obvious.
anyhelp would be greatly appreciated.

Thanks!
--
-------------------------
Sean P. Scanlon
perl -le 'print pack("h*", "3707370426c6575646f647e2e65647")'
-------------------------



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Bricolage-General mailing list
Bricolage-General@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bricolage-general
Re: [Bricolage-General] "story" vs "cover" [ In reply to ]
On Tuesday, February 18, 2003, at 01:50 PM, Sean P. Scanlon wrote:

> Hi All,
>
> I am trying to figure out how I can tell the difference between a
> cover and a story.
> I am generating a "bread crumb" and I only want to output the title of
> the story if it is in fact of "story" type.
> I am doing this in the autohandler:
>
> <snip>
>
> % if ($story->get_primary_category->ancestry_dir !~ /^\/home/
> % && $story->get_primary_category &&
> $story->get_primary_category->get_name ne 'Root Category') {
> &nbsp;&gt;&nbsp;
> <a href="<% $story->get_primary_category->ancestry_dir %>/"
> class="bread">
> <% $story->get_primary_category->get_name %></a>
> % }
>
> </snip>
>
> I looked thru the perldocs, but i didn't see anything obvious.
> anyhelp would be greatly appreciated.

Why not just put the bread crumb in your story.mc template but not in
your cover.mc template?

David

--
David Wheeler AIM: dwTheory
david@kineticode.com ICQ: 15726394
Yahoo!: dew7e
Jabber: Theory@jabber.org
Kineticode. Setting knowledge in motion.[sm]



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Bricolage-General mailing list
Bricolage-General@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bricolage-general
Re: [Bricolage-General] "story" vs "cover" [ In reply to ]
> Why not just put the bread crumb in your story.mc template but not in
> your cover.mc template?

I wish I could, it has todo with the design constraints I have.
I hope this doesn't mean that there is no way to discern between the
two?

--
-------------------------
Sean P. Scanlon
perl -le 'print pack("h*", "3707370426c6575646f647e2e65647")'
-------------------------



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Bricolage-General mailing list
Bricolage-General@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bricolage-general
Re: [Bricolage-General] "story" vs "cover" [ In reply to ]
On Tuesday, February 18, 2003, at 02:35 PM, Sean P. Scanlon wrote:

> I wish I could, it has todo with the design constraints I have.
> I hope this doesn't mean that there is no way to discern between the
> two?

What about $m->top_comp (or $m->request_comp in Bricolage 1.5.0/Mason
1.1x)?

Regards,

David

--
David Wheeler AIM: dwTheory
david@kineticode.com ICQ: 15726394
Yahoo!: dew7e
Jabber: Theory@jabber.org
Kineticode. Setting knowledge in motion.[sm]



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Bricolage-General mailing list
Bricolage-General@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bricolage-general
Re: [Bricolage-General] "story" vs "cover" [ In reply to ]
On Tuesday, February 18, 2003, at 02:43 PM, David Wheeler wrote:

>> I wish I could, it has todo with the design constraints I have.
>> I hope this doesn't mean that there is no way to discern between the
>> two?
>
> What about $m->top_comp (or $m->request_comp in Bricolage 1.5.0/Mason
> 1.1x)?

Actually, I'm being silly. You can just check $element->get_name! The
top-level (story type) element is the one that's in scope in an
autohandler.

HTH,

David

--
David Wheeler AIM: dwTheory
david@kineticode.com ICQ: 15726394
Yahoo!: dew7e
Jabber: Theory@jabber.org
Kineticode. Setting knowledge in motion.[sm]



-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
_______________________________________________
Bricolage-General mailing list
Bricolage-General@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bricolage-general