dror tirosh wrote:
> Is there a reason why this doesn't work the other way around, for example:
> I have an area of the website which I have restricted access to, I 
> wanted to
> have a parent page that takes care of the restrictions for all child pages.
> What I did was have a parent with a restricted_behavior and a body part 
> that
> shows either a 'registered' or a 'not_registered' page parts depending if
> the user is registered or not.
> Then I have child pages hat do not have a body page part, so radiant finds
> the body page part in the parent, but if the tags I used in the parent are
> not in the child behavior I get errors that the tags are not recognized,
> which made me duplicate the tags to all behaviors I use with the page
> children.
> Is this the way it suppose to work? Is there any other way of doing what I
> want to do?
> Dror

A clever hack for using multiple behaviors on the same page is to create 
another page, assign a behavior to it, and then use the <r:find /> tag 
to include content from it. For example, on the Ruby-Lang site we have a 
top-projects box which is repeated on most of the top level pages. To 
make this work we do this:

<r:find url="/en/libraries/top-projects/">
   <r:content part="top-projects" />
</r:find>

This outputs the "top-projects" part of the top projects page. You can 
see it in action in several places:

http://new.ruby-lang.org/en/
http://new.ruby-lang.org/en/libraries/
http://new.ruby-lang.org/en/libraries/top-projects/

--
John Long
http://wiseheartdesign.com
_______________________________________________
Radiant mailing list
Post:   [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to