The essential problem here is the browser (not the server) computes the
full url path to a resource from a given relative path and the page's
full url path. Any solution you come up with will have to be able to
differentiate the relative images that are in docroot from the images
stored in the repository. Not so easy when the incoming request for an
image is always the full path as computed by the browser.
--David
Bernd Brenner wrote:
Isn't it possible to customize magnolia for a base folder, the way
that when I use a relative link that the "folder/node"-context for
this link would be the "docroot" folder?
Thus when I use "<src="image.jpg".../>" that it would automatically
find the image.jpg file in the "docroot" folder?
Regards,
Bernd
Erik Alphenaar schrieb:
Due to the fact that the magnolia page tree isn't really a real tree
in the
file system, but a node-tree in the application, I recommend putting
all images in the docroot.
Regards, Erik Alphenaar,
Neteffect Holding BV.
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
Sent: woensdag 9 augustus 2006 11:56
To: [email protected]
Subject: Re: [magnolia-user] absolute and relaive paths inside magnolia
structure
Thanks Erik, this is working good!
I do not understand the magnolia path structure very well.
When I have a link or image without any path in my template page,
e.g. <img src="cheers.jpg"/>, where am I supposed to put it? Where
the templae will finaly be "executed"? Should the image be in the
magnoliaAuthor folder? Or aren't you supposed to use any relative
links in the templates?
Best regards,
Bernd
Erik Alphenaar schrieb:
That'll be something like:
<link rel="stylesheet" type="text/css"
href="${request.contextPath}/docroot/css/style.css" />
Regards, Erik Alphenaar,
Neteffect Holding BV.
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
Sent: woensdag 9 augustus 2006 11:31
To: [email protected]
Subject: [magnolia-user] absolute and relaive paths inside magnolia
structure
Hi all,
I want to refer from a template page to a resource in the "docroot"
folder, e.g. a link to an image or a stylesheet.
At the moment, my stylesheet is included in the template page like
this:
<link rel="stylesheet" type="text/css"
href="/magnoliaAuthor/docroot/css/style.css" />
My question:
How can I manage to give a relative link in "href" from a template
jsp page to the docroot folder? If I leave the link absolute like
this, after activation to the magnoliaPublic instance the link will
still point to the author instance of course....
Thanks all,
Bernd
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------