Page 1 of 1

Replacement tag Category

Posted: Thu 18. Mar 2010, 22:23
by design
This is a very simple question. I'm looking for an answer in the forum and wiki without any success since days...

How can I create a simple link to a Category just saying "show me category ID 8" and the output should be just a text link (category name - not alias).

Searching I found a lot of things about "current id category", "current alias category"... But I want just a link to a defined category. Link to category id=8. NO ALIAS, NO CURRENT!

How can I do?

For example {CATEGORY:8} --->> HTML output --->> <a href="index.php?contacts">CONTACTS</a>.

I know, it's so simple... But I can't do it!
Thanks!

Re: Replacement tag Category

Posted: Fri 19. Mar 2010, 09:21
by flip-flop
... and a very simple answer: :D

I have enhanced all versions in Standard tags assembled with the TAG: {CATEGORY_GO:ID}

Example: {CATEGORY_GO:14} (in site structure the category "Category03" has the alias category03 and the id=14)

Code: Select all

<a href="index.php?category03" class="phpwcmsIntLink">Category03</a>
Knut

Re: Replacement tag Category

Posted: Fri 19. Mar 2010, 13:26
by design
Knut, I love you! :oops:

I notice you updated the script!

UPDATE: 19.03.10 (KH) –> added {CATEGORY_GO:ID}

Thanks, thanks, thanks!!!

Serena

Re: Replacement tag Category

Posted: Tue 28. Jun 2011, 15:02
by design
Hi Knut,
do you think could be useful add a new tag in your "Standard tags assembled" like: {CATEGORY_CLASS}?

This tag will be print the class inside Category (new features: CSS class).

I think it can be very interesting because people could add in the template something like this:

Code: Select all

<div id="wrapper" class="{CATEGORY_CLASS}">...</div>
I see that class is used only in the menu. But in the wrapper could be equally useful.

What do you think?
Thanks!

Re: Replacement tag Category

Posted: Wed 29. Jun 2011, 16:31
by flip-flop
Solved :)

Knut