Andy Wardley <[EMAIL PROTECTED]> writes:

> I was thinking about allowing certain modifier metacharacters on the 
> end of an INCLUDE_PATH element which activate this kind of behaviour.
> For example, 
> 
>    INCLUDE_PATH = /foo:/bar+


> Another thought is that it would be nice for the provider/document to 
> be able to find all possible matches so that we can introduce the 
> concept of pseudo-inheritance between template components.  Currently,
> [% component %] always gives the Template::Document for the current
> template component, and so [% component.super %] (or something like that)
> could be the next template that would have matched after this one 
> (e.g. the template of the same name one of the parent directories).
> 
> Thoughts?  Comments?  Suggestions?


The path for inclusion of components ir related to models of document
tree.  I would like to here more about what the intended result is
before suggestions about how to achive it.


I guess that the reason for searching in the parent directory is for
things like footers, and menues and have them differ between diffrent
sections of the site.  It's easy to have the directory heiarchy
correspond to the web site navigational structure.

That would explain the desire to search current, parent and parents
parent down to the web root.  But why go up, as with "/bar+"?

And what if you would like to put the include parts in a subdir like
this:

.
|-- index.html
|-- lib
|   |-- footer.html
|   |-- header.html
|   `-- menu.html
|-- section1
|   |-- index.html
|   |-- lib
|   |   |-- header.html
|   |   `-- menu.html
|   |-- pageb.html
|   `-- pagec.html
|-- section2
|   |-- index.html
|   |-- lib
|   |   `-- header.html
|   |-- pageb.html
|   |-- pagec.html
|   `-- subsection2-2
|       |-- index.html
|       |-- lib
|       |   `-- menu.html
|       `-- pageb.html
`-- section3
    |-- index.html
    |-- pageb.html
    `-- pagec.html



But this gives just versioning in one dimenstion for the choice of
component to include.  It's just the section.  Not the style,
language, et al.


And it would be better to integrate this with a general notion of
inheritance in a object tree.  That would let us chose between DB and
dir storage without changing the template code.

Let the notion of a documents/blocks parent be flexible.


-- 
/ Jonas  -  http://jonas.liljegren.org/myself/en/index.html


Reply via email to