[TYPO3] Relative links in template broken
Felix Natter
felix.natter at smail.inf.fh-brs.de
Sun Jan 28 14:11:20 CET 2007
"Christopher Torgalson" <bedlamhotel at gmail.com> writes:
> Hi,
>
> On 1/27/07, Felix Natter <fnatter at gmx.net> wrote:
> > Felix Natter <felix.natter at smail.inf.fh-brs.de> writes:
> >
> > > "Markus Lange" <markus.lange at bgm-gmbh.de> writes:
> > >
> > >> > Hi!
> > >> >
> > >> > felix wrote:
> > >> > > I am using a relative link <a href="#top"><img src="up.gif"
> > >> > > border="0"/></a>
> > >> > > in my HTML template. Unfortunately this is prefixed with the
> > >> > > directory
> > >> > > name "fileadmin/templates/std" when the template is used:
> > >> > > <a href="fileadmin/templates/std/#top"...
> > >> > > How can I prevent this from happening? I tried to search on the web
> > >> > > but couldn't find anything. I am using templavoila if that matters.
> > >>
> > >>
> > >> Check doc of automaketemplate serach for relativepathprefix.img
> > >
> > > Couldn't find anything like that in automaketemplate-doc (neither
> > > online nor .sxw).
> > >
> > >> Or simply write ../../#top
> > >
> > > This does not work with IE/Firefox: they would generate this link:
> > > /fileadmin/#top
> > > which is not resolved as "#top".
> >
> > Meanwhile I also tried "../../../#top" but this will always load
> > index.php#top (start page).
> >
> > Is there any way I could fix this? Any hint would be appreciated.
> >
> > thanks in advance!
>
>
> Simple solution: use a typolink in your template:
>
> lib.topLink = IMAGE
> lib.topLink {
> file = foo/bar/top.gif
> altText = Top link graphic
> titleText = Top of page...
> stdWrap.typolink {
> parameter.data = page:uid
> section = top
> }
> }
thanks, this works great!
--
Felix Natter
More information about the TYPO3-english
mailing list