Put it in a snippet! Snippets are evaluated in the context of the local page (whether that's the one being rendered on a global level or not).
However, I do see your point. I'm not sure what complications it would cause in the parsing/evaluating. Sean On 4/2/07, Oliver Baltzer <[EMAIL PROTECTED]> wrote: > Hi all, > > I guess this question is probably more directed to John, but I would > like some discussion on this topic. If I understand it correctly all > Radius tags in a page are currently evaluated within the same context, > the context of that page. This, however, limits the number of > available tags to those defined for that page and my question is > whether it would be possible to change the context in which tags are > being evaluated dynamically? > > Consider the following example: > > Page /: > > <r:find url="/archive/"> > <r:children:each> > <r:link/> > </r:children:each> > </r:find> > > Currently, all of these tags are evaluated in the context of page /. I > am suggesting, however, to evaluate each tag in the local context it > actually refers to. In this example <r:children:each> would be > evaluated in the context of page /archive/ and <r:link> in the context > of each of the respective children of /archive/. > > You may now ask why that would be useful? The answer is quite simple: > with different page types defined, a single context does not have the > knowledge of the capabilities of each page type when it processes it. > In the example above, we assume that page / knows how page /archive/ > stores its children, and how a link to any of these children is > constructed. This, however, cannot always be assumed, as /archive/ may > prefer to use a different algorithm to iterate over its children than /. > > This approach also allows to limit tags to only those contexts in > which they are useful. For example: > > <r:find "/gallery/"> > <r:images:each> > <r:thumbnail/> > </r:images:each> > </r:find> > > With the context dynamically changing there is no need to define the > tags <r:images:each> and <r:thumbnail> globally as a standard page > tag, but instead leave it restricted to the gallery page. > > What do you think? I hope that made sense and wasn't too confusing. > > Cheers, > Oliver > > > _______________________________________________ > Radiant mailing list > Post: [email protected] > Search: http://radiantcms.org/mailing-list/search/ > Site: http://lists.radiantcms.org/mailman/listinfo/radiant > > _______________________________________________ Radiant mailing list Post: [email protected] Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
