On Tue, Feb 17, 2009 at 8:36 AM, jacmgr <[email protected]> wrote:
>
> I noticed this problem too since several versions ago.   When you
> include a file, a template that is built into the included file with
> [[#somename]]templatehere[[#END]] does not get used.  It does get used
> when you view the page directly, but not when included.  As normal
> seperate template file named template.somename does get used when
> referenced in the included file.   I agree that should be fixed.

Thiis is because the template finder code looks on the current page,
which is the page doing the including, not the page that is included.
I rewrote the code to accomplish what we want, but not sure whether or
not we want this to be the universal behavior or just an option. For
example, if someone had a standard search function used in several
different hierarchies, it might be valuable to have that included
search function use the parameters of the current hierarchy.

So for now (next release), we can set basepage=true in an include and
it will temporarily switch the current page for the include. This is
somewhat temporary though, as we might decide to make this the default
behavior and use basepage=false to revert to our current behavior.
Just want to think about this some more and get some feedback from
others.

> Also I would like to reccommend that template=part1.part2 works so
> that if template.part1.part2 is not found, that it look for a file
> exactly named part1.part2 etc....  This would allow me using the
> sitefolders to put all of those files in a folder.

I had some small reservation about this, thinking it might lead to
unexpected result (unexpected assuming you hadn't read the doc's which
say you can do this...) or even problematic results (when pages like
blog calls template.blog, and then the template gets renamed or
something. Loops.  Another issue was security concerns. My first shot
at this gave me view access to any page in my site. But a little bit
of reworking and was able to tighten it up. Note a person does not
need view authorization for normal template* pages. This can be taken
care of, but then the page name gets passed to the function as the
format, which shows up in your output. Not good.

Anyway, this will be in the next release. It's the last resort
checked. Let me know if it causes anyone problems. At least not in
most cases, I think...

Cheers,
Dan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to