[opencms-dev] (5.3.5) Query about SiteRoot

mmihaili at csc.com.au mmihaili at csc.com.au
Wed Aug 4 07:29:01 CEST 2004


Can someone explain why getSiteRoot works the way it does.
I am attempting to make my menu builder jsp more generic so it can be used
by multiple sites, and I need to get the site root.

I am using List navList = cms.getNavigation().getNavigationForFolder(uri)
in an iterative manner to build my menu list (like a sitemap, i use
coolmenus to show off).
But I have had issues with CmsRequestContext.getSiteRoot and have had to
wrapper it with some extra code. Senarios follow:

offline mode
getSiteRoot returns an empty string
i need to change that to /sites/default/ (as an example, and it is done via
api to get path of current uri)

online mode
getSiteRoot returns /sites/default/
i need to change that to "/", otherwise urls are incorrect

export
getSiteRoot returns /sites/default/
this too needs to be changed to "/"

It's been a little difficult to explain this, I hope someone understands
and can give me some guidance.
Maybe there is some other method I should be using, I'll check again.

Regards,
Moris Mihailidis
__________________________________________________
Computer Sciences Corporation
EBS-BSS Web Services e-Business South
58 Queensbridge St, Southbank, VIC 3006, Australia
Ph: +61-3-8695-1527    Fax:+61-3-8695-1540
Email: mmihaili at csc.com.au
----------------------------------------------------------------------------------------

This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
----------------------------------------------------------------------------------------





More information about the opencms-dev mailing list