Hi,

We at EO make heavy use of the treeinclude/leafinclude tags present in
MMBase. There is however a problem with it that it always includes files
relative to the HTML root of the webapp. Let me show:

<leafinclude page="includes/bla.jsp" objectpath="1,3">
(1 is an objectnumber, for an object of type 'portals')
(3 is an objectnumber, for an object of type 'programs')

will evaluate:

/1/3/includes/bla.jsp
/portals/3/includes/bla.jsp
/portals/programs/includes/bla.jsp

The problem here is that all these paths are relative to the root of the
webapp: there is no way to make leafinclude evaluate the following
paths:

/blub/1/3/includes/bla.jsp
/blub/portals/3/includes/bla.jsp
/blub/portals/programs/includes/bla.jsp

(one could ofcourse add an extra builder with name 'blub' and add an
object of this type to the objectpath, but that's a _very_ ugly hack).

I propose to add another parameter to both leafinclude and treeinclude,
to make them start looking in a path relative from the HTML root. The
new parameter 'root' should be used like this:

<leafinclude root="blub" page="includes/bla.jsp" objectpath="1,3">

in order to make leafinclude evaluate the paths mentioned in the last
example.

I would very much like this change to be added to both MMBase-Head (1.7)
and 1.6; since upgrading to 1.7 is not going to happen soon here. 

Jaco: you are projectlead for taglib1, do you have any problems with
this?

Johannes
ps: I agree that I could've sent this mail to Jaco only, but I think it
benefits all to know the motivation of a possible change in the stable
release.


Reply via email to