Page 1 of 1

Outputting tags to a separate page

Posted: Sun Aug 30, 2020 12:24 am
by skywerty
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)

Re: Outputting tags to a separate page

Posted: Sun Aug 30, 2020 1:34 am
by Edi
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>';

?>

Re: Outputting tags to a separate page

Posted: Sun Aug 30, 2020 2:02 pm
by skywerty
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 ..)

Re: Outputting tags to a separate page

Posted: Mon Aug 31, 2020 11:31 am
by Edi
There are explanations how themes and templates work and examples in the documentation:

https://docs.bludit.com/en/themes

Re: Outputting tags to a separate page

Posted: Mon Aug 31, 2020 10:03 pm
by skywerty
Thanks!) Did, works