Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2008-03-21 15:32:06

tenroc2o0o
New member
Registered: 2008-03-21
Posts: 1

Content Management System & Relative Paths

I've setup a content management system for all of my customers who I host websites for.  My CMS is on my own website, ex. webhost.com.

My problem is this:  In the customer's html code, if they use a relative path location, say, "/images/top.jpg", when the image loads in Xinha it's relative path is my website, webhost.com. So the image loads as "http://webhost.com/images/top.jpg".  What I want to be able to do is change that default image location if it's a relative path to their own site, say customersite1.com, so that the image, while being EDITED in Xinha, loads as "http://customersite1.com/images/top.jpg".  This way the images won't load as broken images while editing their content.

Is there somewhere in the source code I could change this? Say while the image is being drawn in Xinha, just append my path to the front of the .src for the image being loaded?

Thanks in advance!

Offline

#2 2008-03-28 23:32:22

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Content Management System & Relative Paths

I would not recommend using Xinha in this manner.  But you can look in the config at the baseHref config option from memory.


James Sleeman

Offline

#3 2008-04-12 17:05:56

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: Content Management System & Relative Paths

This should work correctly from now on (revision 992)

xinha_config.baseHref = 'http://customersite1.com/';

Offline

#4 2008-09-29 08:00:45

zdravko
New member
Registered: 2008-09-26
Posts: 8

Re: Content Management System & Relative Paths

Well, I find it also a problem. It seems that prepending  /data/preview/ before url in src tag would do
for me.

I use bricoalge.

Offline

Board footer

Powered by FluxBB