Outputting tags to a separate page

Post Reply
skywerty
Jr. Bludit
Posts: 3
Joined: Sun Aug 30, 2020 12:18 am

Hello!)
Tell me how to display all tags on a separate page with tags?

Sorry if this question has already been.
Thank you in advance)
User avatar
Edi
Site Admin
Posts: 2083
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

You can use the code of the plugin Tags:

Code: Select all

<?php

global $tags;
global $url;

echo '<ul>';

// By default the database of tags are alphanumeric sorted
foreach( $tags->db as $key=>$fields ) {
   echo '<li>';
   echo '<a href="'.DOMAIN_TAGS.$key.'">';
   echo $fields['name'];
   echo '</a>';
   echo '</li>';
}

echo '</ul>';

?>
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
skywerty
Jr. Bludit
Posts: 3
Joined: Sun Aug 30, 2020 12:18 am

Edi wrote: Sun Aug 30, 2020 1:34 am You can use the code of the plugin Tags:

Code: Select all

<?php

global $tags;
global $url;

echo '<ul>';

// By default the database of tags are alphanumeric sorted
foreach( $tags->db as $key=>$fields ) {
   echo '<li>';
   echo '<a href="'.DOMAIN_TAGS.$key.'">';
   echo $fields['name'];
   echo '</a>';
   echo '</li>';
}

echo '</ul>';

?>
Excuse me, but where to insert this code and how? I made a static page "Tags" and if I insert it from the editor, then the code does not work, and I cannot understand how to insert it differently.
Sorry for a possibly stupid question ..)
User avatar
Edi
Site Admin
Posts: 2083
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

There are explanations how themes and templates work and examples in the documentation:

https://docs.bludit.com/en/themes
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
skywerty
Jr. Bludit
Posts: 3
Joined: Sun Aug 30, 2020 12:18 am

Thanks!) Did, works
Post Reply