[Typo3] Configuration of External Links

Thomas Hoppe thomas.hoppe at berlin.de
Wed Dec 7 16:51:37 CET 2005


Once again and finally, hi list

finally I figured out how style.sitemap.gs can be extended so that external
urls are used in the menu.
Since the solution might be of interest for others, I post it here to
conclude this thread.

tt_content.menu.20.2 < styles.sitemap.gs

tt_content.menu.20.2.20.20.2.NO {
   stdWrap.cObject = CASE
   stdWrap.cObject {
    key.field = doktype
    default = TEXT
    default.field = title
    default.typolink.parameter.data = field:uid
    default.typolink.ATagBeforeWrap=1
    default.typolink.wrap=|
    3 < .default
    3.typolink.ATagBeforeWrap=1
    3.typolink.wrap =
    3.typolink.parameter.data >
    3.typolink.parameter.dataWrap = http://{field:url}
   }
  doNotLinkIt = 1
  subst_elementUid = 1
  wrapItemAndSub =
}

Of course, if you need external URLs on the third menu level
tt_content.menu.20.2.20.20.2.NO
needs to be changed to tt_content.menu.20.2.20.20.3.NO. On the first menu
level this solution
changes the font color.

Probably, styles.sitemap.text can be adopted with this solution accordingly,
but I didn't tested it.

One strange thing still happens, if you have on the third level just
External URLs, wget will still be
fouled with a wrong domain name. But if the first menu entry points to a
normal page everything
works fine. Well, I can live with that.

Thanks to Christopher for pointing me into the right direction.

Regards,

Thomas

> On 06/12/05, Thomas Hoppe <thomas.hoppe at berlin.de> wrote:
> > Hi,
> >
> > Right, yes, I forgot to mention, that I need them in menues (more
precisely
> > in sitemap.gs).
> > I also found the above mentioned posting, but as far as I could see
after
> > some tests, it just
> > seems to modify the status bar of the browser (and that not even
correctly),
> > but the URLs
> > in the page code remain unmodified :-(
> >
>
> Then you weren't looking at the posting I linked to. If you were
> looking at it, _check your source code_; there's no JS in that code,
> so if the status bar changed, then it means the link _did_ change.
> This part of that code:
>
> >     3.typolink.ATagBeforeWrap=1
> >     3.typolink.wrap = |<img src="/fileadmin/images/extlink.gif"
>
> ...plus this:
>
> 3.typolink.parameter.dataWrap = http://{field:url}
>
> ...and this:
>
> 3.typolink.parameter.data >
>
> ...will change the link to a en external link in the form 'http://' +
> 'whatever you type into the url field in the page'




More information about the TYPO3-english mailing list