Featured post
ruby on rails - Radiant: "Archive Month Index" -
i trying set simple blog radiant cms , have problem "archive month index". set described on weblog can't work.
the code the same guy in video st using. it's:
<r:archive:children:each> <div class="blog-post"> <h3><r:link /></h3> <p> <r:content /> </p> </div> </r:archive:children:each>
...for archive index.
however when go onto post/2010/12 site (or other date) amazing
standardtags::tagerror in sitecontroller#show_page recursion error: rendering `body' part.
...instead of index page month. can't think of how rendering body part twice.
i had same problem. default blog setups created radiant's installer.
the blog pages in radiant looks like:
+ articles (archive) | +- %b %y archives (archive month index) | +- first post | +- second post | +- third post
everything under articles page seems included in results returned <r:archive:children:each></r:archive:children:each>
.
this means if index page , first post created on feb 02 2011, url /articles/2011/02/ throw exception because index page being processed generate page list of articles feb 2011 recursively attempt process itself.
the solution wound using <r:unless_self></r:unless_self>
tags winnow page being processed (i.e. index page) results of <r:archive:children:each></r:archive:children:each>
.
an example non-crashing body
page part index page this:
<r:archive:children:each order="desc"> <r:unless_self> <div class="entry"> <h3><r:link /></h3> <r:content /> </div> </r:unless_self> </r:archive:children:each>
- Get link
- X
- Other Apps
Comments
Post a Comment