Problem with navigation_tags after upgrade to radiant 0.6.4

Hi again everyone,
Now after upgrading i’m realizing my navigation_tags are not working
anymore

Here’s a code example

<r:children:each>

<li>

  <r:if_ancestor_or_self>

   <r:link class="active-cat" />

  </r:if_ancestor_or_self>

</li>

</r:children:each>

I get this in the output when I call that page

undefined method `url’ for nil:NilClass

It does iterate through the children since I can do <r:link/> on its own

This used to work with Radiant 0.6.3, I also got the latest revision of
the
navigation tag (r83) but same result.

if I look at navigation_tags.rb this is the definition

Inspired by this thread:

http://www.mail-archive.com/[email protected]/msg03234.html

Author: Marty H.

desc %{

Renders the contained element if the current item is an ancestor of 

the
current page or if it is the page itself.

}

tag “if_ancestor_or_self” do |tag|

Page.benchmark "TAG: if_ancestor_or_self - #{tag.locals.page.url}" 

do

  tag.expand if tag.globals.actual_page.url.starts_with?(

tag.locals.page.url)

end

end

I’m not a rails coder in any way so any help is appreciated

Thank you

Christian

Christian,

I haven’t had a chance to test navigation_tags in 0.6.4. I’ll check it
out and post a fix if I find one. Meantime, if you figure something
out, please send me a patch.

  • Ryan

tag.globals.actual_page was replaced with tag.globals.page in 0.6.4.
Change that part of the tag and it should work as before.

Cheers,

Sean

Hey guys,

Even with that changed I was never able to get <r:if_self> working BUT
<r:if_ancestor_or_self> seemed to work like it used to.

I mentioned that about a month ago, FYI.

http://www.ruby-forum.com/topic/132705#new

Cheers,


Travis B.
Not sent from my iPhone.