BlogTags with AJAX

Blog tags for rainlab.blog plugin

Back to BlogTags with AJAX Support

Hessel
Hessel

Hi,

my tags display all tags ever created. how can I show only the tags that are set to that specific post?

Kind regards,

Hessel

Surahman
Surahman

Could you give me your code?

Last updated

Hessel
Hessel

yeah sure, this code is inside the blogPost partial from Rainlab blog plugin:

<div class="tags">
     <span class="tags-title">Tag : </span>
     {% component 'tags' %}      
  </div>

and inside the component 'tags' this code beneath:

{% set tags = __SELF__.tags %}
  <span>
    {% for tag in tags %}
    <a>#{{ tag.name }}</a>    
    {% endfor %}
 </span>
byers.jacob24609
byers.jacob24609

Is there any update on this?

Surahman
Surahman

Hi, I'm sorry I didn't know the notification comes.

I already put the example code in plugin documentation and the code looks like:

title = "post"
url = "/post/:slug"

[blogPost]
slug = "{{ :slug }}"
==
<h1>{{ post.title }}</h1>
<p>
    <i class="glyphicon glyphicon-tags"></i>
    {% for tag in post.tags %}
    {{ tag.name }} {% if not loop.last %}, {% endif %}
    {% endfor %}
</p>
<p>{{ post.content_html|raw }}</p>

Last updated

1-5 of 5