[opencms-dev] Default-file for folder tree

Nagy Attila lists.opencms.org at tylla.hu
Wed Mar 2 18:29:08 CET 2011


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.





More information about the opencms-dev mailing list