[Radiant] What is available to a Behavior?
Sean Cribbs
seancribbs at gmail.com
Tue Aug 15 16:49:12 CDT 2006
Well, maybe I could put it this way... is there a way to determine the
page being processed from the request object passed to process_page?
All I need is to get an instance of the page, then I'll be able to
manipulate it however I like.
Sean Cribbs
seancribbs.com
P.S. Ok, ok, so I'll spill the beans. I'm working on a behavior(s) that
will allow comments to be posted as new (grand-)child pages.
> Sean Cribbs wrote:
>
>> I'm working on a page behavior of my own and I've looked briefly at the
>> delegation mechanism. Would I be correct in assuming that any method that
>> is available to a Page is available in the Behavior methods that are
>> delegated to?
>>
>
> No. Pages currently delegate the following methods to a behavior:
>
> delegate_to :behavior, :url => :page_url, :cache? => :cache_page?,
> :find_by_url => :find_page_by_url, :render => :render_page,
> :virtual? => :page_virtual?
>
> delegate_to :behavior, :process, :child_url
>
>
>> Specifically, I'd like to be able to manipulate the page,
>> its parts and its children.
>>
>
> Not sure what you are doing, but you may end up having to override
> existing tags in order to get it to work. Behaviors are due for a
> refactoring.
>
> --
> John Long
> http://wiseheartdesign.com
> _______________________________________________
> Radiant mailing list
> Radiant at lists.radiantcms.org
> http://lists.radiantcms.org/mailman/listinfo/radiant
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.radiantcms.org/pipermail/radiant/attachments/20060815/37ab2933/attachment.html
More information about the Radiant
mailing list