[[category]] tag two new attributes

Discuss PivotX 2.0.x here. Non-PivotX related discussions go in The Drain.

[[category]] tag two new attributes

Postby kakashka12345 » Sun Jan 16, 2011 10:07 am

Is it possible to have added to [[category]] tag two attributes: "rel" and "title" ? Mainly for SEO.

Thanks
kakashka12345
 
Posts: 10
Joined: Sun Dec 26, 2010 4:01 am

Re: [[category]] tag two new attributes

Postby Bob » Sun Jan 16, 2011 4:34 pm

Sounds like a good idea, and not much work to do. This will be in PivotX 2.2.3. It's added to our tracker: http://npx-bugs.twokings.eu/bugs/view.php?id=35
Bob
Lead Developer
 
Posts: 1374
Joined: Tue Nov 20, 2007 11:16 pm

Re: [[category]] tag two new attributes

Postby hansfn » Sun Jan 16, 2011 7:48 pm

Well, if you don't mind adding some more code to your entry template, replace [[ category ]] with

Code: Select all
[[ foreach from=$entry.category item='category' ]]
[[ link category=$category title="More post in the `$category` category" ]]
[[ /foreach ]]


or if you really, really need the rel tag:

Code: Select all
[[ foreach from=$entry.category item='category' ]]
<a href="[[ link category=$category hrefonly=1 ]]" rel="whatever"
     title="More post in the [[ category name=$category ]] category" >[[ category name=$category ]]</a>
[[ /foreach ]]
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway


Return to 2.x Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron