Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

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> 

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -