Mohit Sindhwani wrote: > > Andrew Neil wrote: > >> You could try this: > >> * Create each bio page separately as you suggested > > > > I agree. This is a good way to go. > > > >> * Create a special page part called 'anchor' in the bio page > >> > >> You could then write a special tag that creates a link to that anchor > >> using r:children:each > >> and a special tag similar to r:content called r:content_anchor that > >> spits out the anchor in the HTML before doing the r:content for the > >> child page? > > > > No need for an extra page part, you can just use the slug. For a page > > to pass as HTML valid, one of the requirements is that no two elements > > share the same id. Likewise, Radiant enforces that no two sibling > > pages have the same slug. > > > > Output the content like this: > > > > <r:children:each> > > <div id="<r:slug/>"> > > <r:content/> > > </div> > > </r:children:each> > > > > And the index like this: > > > > <r:children:each> > > <a href="#<r:slug/>"><r:title/></a> > > </r:children:each> > > That's good! I always get confused whether "#<r:slug />" works! But I > guess it does.
You can put radius tags wherever you want, except within other radius tags; that means you can set attributes to radius tags and have their output as the attriute's value in your HTML doc. > Also, do div IDs work as anchors? Or should that be > changed to: > <a name="<r:slug />"> ... </a> The name attribute does not exist in XHTML 1.1 and the id attribute works as an anchor, no matter what element it is with -- in XHTML it is universal. Thus, don't use the name attribute unless you need to stick with HTML4 -- dunno about HTML5, actually. Best Regards Chris _______________________________________________ Radiant mailing list Post: [email protected] Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
