[opencms-dev] Default-file for folder tree

Paul-Inge Flakstad flakstad at npolar.no
Wed Mar 2 19:13:23 CET 2011


Hi Tylla,

You can always submit an enhancement proposal in the OpenCms bugtracking system: http://bugzilla.opencms.org/

Cheers,
Paul
________________________________________
Fra: opencms-dev-bounces at opencms.org [opencms-dev-bounces at opencms.org] på vegne av Nagy Attila [lists.opencms.org at tylla.hu]
Sendt: 2. mars 2011 18:29
Til: The OpenCms mailing list
Emne: Re: [opencms-dev] Default-file for folder tree

Hi!

I want to answer my own question, at least what concerns the working of
the default-file property.

As I found out while searching the OpenCMS sources, the default-file
property gets handled in the CmsJspNavBuilder.java file.
The property gets read for the current folder and the default-files
settings from opencms-vfs.xml config are attached to it in a list.
Afterwards the files are checked for existence and the first one which
exists gets returned.

The problem is, that each file gets tested by appending it to the folder
name (path) like a string, so only filenames can be used (not even
relative paths).

I think that by modifying a few lines of code this could be made a
really general solution.
I am thinking about things like checking whether the first character of
the default-file property is "/", and if it is, then check it for
existence by itself without the addition of folder path.
This way one could simply use self written and reusable default-files on
a per-directory base.

Is someone reading my mail responsible for this area of code?
Whom should I address my mail to propose these changes?
Although I'm not a skilled OpenCMS programmer, I am willing to provide a
patch if it has the potential to be accepted.


Bye,
Tylla.



_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev



More information about the opencms-dev mailing list