[prev in list] [next in list] [prev in thread] [next in thread] 

List:       quanta
Subject:    Re: [Quanta] Absolute v's relative paths in links
From:       Mike Evans <mikee () saxicola ! idps ! co ! uk>
Date:       2005-12-22 14:19:32
Message-ID: 200512221419.32778.mikee () saxicola ! idps ! co ! uk
[Download RAW message or body]

On Thursday 22 Dec 2005 11:49, Jens Herden wrote:
> Hi Mike,
>
> please make sure that you do not reply to a message on the list but start a
> new thread.
Oops.

>
> > I use a script to insert template code, such as std menus for every page
> > on a site.  If I have a tree of directories then I have to use links that
> > differ depending on the depth of that page in the directory hierarchy. 
> > ie I have to prepend "../../" etc. to the link.  Where an ISP webserver
> > supports the use of absolute paths, relative to the website root, it is
> > not necessary to use relative paths and so I can use the same template
> > for all pages regardless of where they are in the tree.  Can I have the
> > same behaviour in Quanta without having to setup the site on localhost
> > webserver?  Or is this a khtml issue rather that a Quanta issue?
>
> I think you should be able to add a base tag to your head section in your
> pages.
>
> 	<base href="http://www.yourdomain.info/" />
>
> Having this in your document makes all relative links relative to this
> location and not relative to the location of the document.
>
> Beware of side effects though. Quanta does not understand this yet and it
> might be that you get unwanted results in a preview or somewhere else.
Thanks Jens

It does what I want in quanta if I use
	<base href="../" />
in the header of documents on step down(up) the tree.  Adding more "../"'s for 
each additional layer.  My links can then look like;

<a href="content/cafe.html">Caf&eacute;</a>
but not like those below.

Unfortunately this does not work when I upload to my webserver.  I have to 
either use relative links or absolute link referenced to web page root.  Both 
these work (on the web server) from pages located in the content dir.

<a href="../content/cafe.html">Caf&eacute;</a>
<a href="/content/cafe.html">Caf&eacute;</a>

I was thinking that defining "document root" in quanta somewhere might be a 
useful thing to have so that all project docs are referenced to that.  Else I 
have to test my pages in quanta then edit the links before I upload.  I could 
flatten the tree I guess.


>
> --
> This email has been verified as Virus free
> Virus Protection and more available at http://www.plus.net

-- 
Mike Evans

GPG Key: 1024D/050895C2
_______________________________________________
Quanta mailing list
Quanta@mail.kde.org
https://mail.kde.org/mailman/listinfo/quanta
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic