[Zope-dev] [BlueBream] handling URLs for multiple sites in single bluebream instance
Joshua Immanuel
josh at hipro.co.in
Fri Jun 17 12:29:47 EDT 2011
Hello,
Sorry to bother again.
On Fri, 2011-06-17 at 16:47 +0200, Thierry Florac wrote:
> Sorry but I'm not really sure to understand what you want or need...
>
> The physical path of your folder inside your ZODB is
> '/site1/container1/...' and to access such a site you only have two
> ways to do it :
> - address it directly in the URL
> - or use virtual hosting to hide '/site1' from the URL
Ok, let me give an use-case. Say, I have a base page layout template for
the inner sites like "http://localhost:xxxx/site1" which has many
application related menu links on the top and left hand side of the page
with center space for contents. All these links are of the format
"/container1/...". When I use virtual hosting to '/site1' I have no
problem, all the links will be a valid one, as it will be prefixed by
"http://localhost:xxxx/site1"
But, If I don't use virtual hosting and I expose
"http://localhost:xxxx/" URL to the user to create new sites. The links
in base page layout template for the inner sites will be an invalid one
as it will be pointing to "http://localhost:xxxx/container1/.." instead
of "http://localhost:xxxx/site1/container1/.."
I am trying to figure out how to prefix the links in the base page
layout template with site names based on which site they belong. So that
the links in the base page layout template of 'site1' would be of the
format '/site1/container1/.." and the links in base page layout template
of 'site2' would be of the format '/site2/container1/.." etc.
I guess the solution to this (without virtual hosting) would be: when I
render the base page layout template for "http://localhost:xxxx/site1"
get the 'site1' part from the request URL and prefix all the related
menu links with them. Is there any other better solution?
But, If I use this base page layout template as a macro (just to fill
its center content with an add form say) still the menu links has to be
a valid one. How to handle this?
Hope I clarified what I need. Please excuse me if my question sounds too
novice.
--
Joshua Immanuel
HiPro IT Solutions Private Limited
http://hipro.co.in
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20110617/8692253e/attachment.bin
More information about the Zope-Dev
mailing list