On 17.03.2009, at 03:15, 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. Also, do div IDs work as anchors? Or should
that be changed to:
<a name="<r:slug />"> ... </a>
This really is much cleaner! No tags needed :)
Well in xhmtl 1.0 the name attribute for a elements is depricated, in
xhtml 1.1. it was removed.
In html4 it's allowed, html 5.0 usese id and name linking but does not
allow the name attribute for a elements as far as i know.
So in modern browsers use id linking =)
Greetings
Cheers,
Mohit.
3/17/2009 | 10:15 AM.
___m i c h a e l s t a r k e____
co-founder of
HicknHack Software GbR
www.hicknhack.com
Graphics
___c o n t a c t____
+49 (170) 3686136
+49 (351) 4045428
[email protected]
___H i c k n H a c k S o f t w a r e G b R____
maik lathan - andreas reischuck - michael starke
hübnerstraße 8
01069 dresden - germany
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant