Does a {ALIAS} RT exist?

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
Post Reply
meeces
Posts: 7
Joined: Fri 18. Aug 2006, 23:11

Does a {ALIAS} RT exist?

Post by meeces »

Please forgive if this is obvious to you... but not to me. Searched everywhere for a simple tag that returns only the category alias that you are currently in. Would be very handy for creating links, plus a nice addition to the {TEASER_EX} tag.

Thanks... :?: :shock:
meeces
Posts: 7
Joined: Fri 18. Aug 2006, 23:11

Re: Does a {ALIAS} RT exist?

Post by meeces »

I guess all you have to do is print [acat_alias] but I'm no good with php...
pepe
Posts: 3954
Joined: Mon 19. Jan 2004, 13:46

Post by pepe »

:idea: Try this..... :idea:

[PHP]
// find alias-name and give back
$alias = $GLOBALS['content']['struct'][($GLOBALS['aktion'][0])]['acat_alias'];
echo $alias;
[/PHP]
meeces
Posts: 7
Joined: Fri 18. Aug 2006, 23:11

Post by meeces »

pepe wrote::idea: Try this..... :idea:

[PHP]
// find alias-name and give back
$alias = $GLOBALS['content']['struct'][($GLOBALS['aktion'][0])]['acat_alias'];
echo $alias;
[/PHP]
That worked perfectly. Can I buy you a beer? Thanks!
bepposun
Posts: 16
Joined: Fri 22. Jun 2007, 17:28

Post by bepposun »

Thanks, for the alias of the upper level category I use now:

$alias = $GLOBALS['content']['struct'][($GLOBALS['LEVEL_ID'][3])]['acat_alias'];
echo $alias;

Seems to work.

Cheers, Beppo
Post Reply