3 Posts
Garstud
5 years ago
5
Topic

Hello,

I need to add a field in the content edit of Seblod to assign Tags to a content.
I have search and find some tricky solutions , but there are quite old !

- Does anybody have explanation or a tutorial link to know how to add a Tag field in a Seblod content ?

Thanks for your help ;)

Get a Book for SEBLOD
5 years ago
1
Level 1

Hi Garstud,  

SEBLOD can take the hand on Joomla! tags.  

You have to install the object Tag

Then you can manage all tags with SEBLOD.

In your content you can add the field "Tags":  

It will create a Join table between you content and your tags, so like that, in the content view you can display tags with a SEBLOD List.  

Regards.

3 Posts
Garstud
5 years ago
0
Level 2

Thank you Lionel. It works Great with the Tag Field.

I have just some points to clear :

1- the rendering of the Tag Field in front displays IDs of tags and not the label, is there is an API to use to display labels of tags (i can do it with PHP in an override, but an API will be great)

2- the Seblod contents don't seems to be accessible in the list of contents for a Tag (only Joomla Articles are shown for a clicked tag in Frontend). When i click on a  Tag in a Joomla Article, the list of results don't display Seblod contents. Is it normal ? How can i add Seblod contents in the list of result for a tag ?

Thanks in advance for any help ;) 

5 years ago
2
Level 1

Hi Garstud,

instead of displaying directly the field Tag, it's better to display the list of the tags by using a SEBLOD List. Like that, you have the hand on the layout of the list. 

For that, you have to : 

  • create a SEBLOD Search & List, based on the Object Tag. 
  • In the search Form, you add the Fied Tag ID, with the match "Any word Exact" + separator ","
  • In the List view, you add the field Tag Title.   

In the Content view of the article :

  • Add the Tag Field in hidden position
  • Add a field SEBLOD List which will display the previous list. As parameters, you will push the name of the tag field => my_tag_field = tag_id

For the second point, you need to create a SEBLOD List base on the Content Type of content that you want to display. To filter this list by Tag, you need to Join the Tag table by using the Search Join Field.

Then in the search form you can add a Select Dynamic which will list tags. This field must have a Standard Free storage on the Join Table. 

Hope it will help

3 Posts
Garstud
5 years ago
1
Level 2

Hello Lionel,

Thank you for this explanation. I understand the use of a "Seblod List" but i was wondering to use the com_tags view because i have many content types (5 types).

- is there is a solution to make a Seblod List for a multi-types list of contents ?

Thanks

5 years ago
0
Level 3

Hello,

Sure, you can list items from multiple content types (as long as all belong to the same object: i.e either from Article Object or from Category Object, ...)

Here are a few screenshots.

Sebastien

Get a Book for SEBLOD