Given the following tag (just the inverse of the "unless_self" tag
defined by Sean in a recent thread):

tag "if_self" do |tag|
 tag.expand if tag.globals.actual_page == tag.locals.page
end

   Seems that it could be as easy as:

<r:find url="/">
<r:children:each order="asc">
<h3><r:link /></h3>
<r:if_self>
    <r:children:each order="asc">
         ...
    </r:children>
</r:if_self>
</r:children:each>
</r:find>

    /AITOR


On 9/8/07, Jeroen Janssen <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I would like to do the following with a radiant site I'm trying to build.
>
> sidebar contains a menu:
> - news
> - band
> - history
> etc.
>
> the menu is build from all the children of the 'top' page, so I have
> the following for the sidebar:
> <r:find url="/">
> <r:children:each order="asc">
> <h3><r:link /></h3>
> </r:children:each>
> </r:find>
>
> What I would like to do (but don't know how to do yet) is to add
> content to the menu when I'm visiting a certain page.
>
> i.e. when currently on the band page, you see:
> - news
> - band
>   - trumpet
>   - piano
>   - bass
> - history
>
> And when on the news page, you see
> - news
>   - current
>   - very old
> - band
> - history
>
> So that would mean my sidebar should be adding content depending on
> whether the page your looking at matches a certain child/parent?.
>
> Any thoughts on how to do this (from radiant?)
> Or should I be looking at writing a plugin to get this done?
>
> Best regards,
>
> Jeroen Janssen
> _______________________________________________
> Radiant mailing list
> Post:   [email protected]
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
_______________________________________________
Radiant mailing list
Post:   [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to