[Radiant] how to exclude current children from a list
of childrens
Sean Cribbs
seancribbs at gmail.com
Fri Sep 7 21:34:37 CDT 2007
Your other option is this tag definition:
tag "unless_self" do |tag|
tag.expand unless tag.globals.actual_page == tag.locals.page
end
<ul>
<r:parent:children:each>
<r:unless_self><li><r:link /></li></r:unless_self>
</r:parent:children:each>
</ul>
Sean
Aitor Garay-Romero wrote:
> Back door extension to the rescue:
>
> <r:erb>
> <% page = tags.locals.page
> parent = page.parent
> siblings = parent.locals.page.children
> siblings.each do |sibling|
> if sibling != page
> %>
> <r:link />
> <% end
> end
> %>
> </r:erb>
>
> I did not test the code above, so beware!
>
> /AITOR
>
> On 9/7/07, Andrea Otto <andrea.otto at tiscali.it> wrote:
>
>> Thanks Aitor!
>>
>>
>> I understood why it didn't work! But <r:navigation/> has the same
>> problem: I can't build url list with radiant's tag...
>>
>> I think there's no solution for this issue...
>>
>>
>> --
>> Posted via http://www.ruby-forum.com/.
>> _______________________________________________
>> Radiant mailing list
>> Post: Radiant at lists.radiantcms.org
>> Search: http://radiantcms.org/mailing-list/search/
>> Site: http://lists.radiantcms.org/mailman/listinfo/radiant
>>
>>
> _______________________________________________
> Radiant mailing list
> Post: Radiant at lists.radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site: http://lists.radiantcms.org/mailman/listinfo/radiant
>
>
More information about the Radiant
mailing list