[Resolved] How to get the permalink of a category
Hello,
How can I get the permalink of the category of a content ?
When a page is displayed, I want to have a link with the category to display all the content of this category.
Again, sorry for my bad english !
Thank's for your help.
How can I get the permalink of the category of a content ?
When a page is displayed, I want to have a link with the category to display all the content of this category.
Again, sorry for my bad english !
Thank's for your help.
Last edited by kriztho on Sat Apr 21, 2018 8:35 am, edited 2 times in total.
- bayerberg
- Master Bludit
- Posts: 141
- Joined: Wed Jun 07, 2017 1:05 pm
- Location: London, UK
- Has thanked: 9 times
- Been thanked: 10 times
- Contact:
i use something like this :
add it to page.php
Code: Select all
<?php
if ($page->category()) {
echo '<a href="'.DOMAIN_CATEGORIES.$page->categoryKey().'">'.$page->category().'</a>';
};
?>
Hi,
I going to add to the documentation this snippet code https://docs.bludit.com/en/developers/categories
Also, I going to add the method $page->categoryPermalink() on the next version.
I going to add to the documentation this snippet code https://docs.bludit.com/en/developers/categories
Also, I going to add the method $page->categoryPermalink() on the next version.