[opencms-dev] Best practices question - how to determine where you are in directory heirarchy
Thomas, Cord
cthomas at rand.org
Wed Mar 17 00:51:02 CET 2004
Hello all, I have a best-practices/how are people doing this question:
I have a corporate web publishing hierarchy that looks like this:
Corp
Division
Department
Then, for each department I want to have a list of active projects,
staff and calendar links. I have set up this structure:
Departments
Department XYZ
Projects
Project A path
Document X
Document Y
Project B path
Document 1
...
Staff
Staff A profile (jsp reads from db)
Staff B profile (jsp reads from db)
....
Question - in my CMS templates, if a user clicks on the link to see
Project A documents, I still want the system to know that I am in
department XYZ and if a user clicks on the link to Staff A profile, I
want all other modules to know that I am in Department XYZ. The
fundament issue is, where do I tell these varying depth navigation
layers how to find the parent they should look to to figure out how to
get the listing of documents in their path? That is to say, the module
that lists the Project A paths should still know how to list those
things for Department XYZ when a user has clicked on the staff profile
A.
I have two thoughts:
each document carries an attribute "root-depth" that tells it the root
depth - this seems like a management headache I would like to avoid
develop a function that steps back through the CmsResource.getPath()
until it finds what it thinks should be that module's root path
is there a better approach? How are other people dealing with this?
Cord
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20040317/42dc4f82/attachment.htm>
More information about the opencms-dev
mailing list