# CMS Toutorial problem with tags

**URL:** <https://discourse.cakephp.org/t/cms-toutorial-problem-with-tags/5210>\
**Category:** Need Help\
**Created:** [November 5, 2018, 10:58pm UTC](https://discourse.cakephp.org/t/cms-toutorial-problem-with-tags/5210 "2018-11-05T22:58:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cetrioloRick](https://avatars.discourse-cdn.com/v4/letter/c/c4cdca/32.png) [@cetrioloRick](https://discourse.cakephp.org/u/cetrioloRick)\
**Post date:** [November 5, 2018, 10:58pm UTC](https://discourse.cakephp.org/t/cms-toutorial-problem-with-tags/5210/1 "2018-11-05T22:58:48Z")

</div>

Hi everyone, i’m having some problem in the tag section:  
i’ve created the \_getTagString method inside the article.php entity

but the prop $this-\>tags is empty so the function return empty string.

i’ve copy pasted all the code, but i’m missing something. i’ve also added this line inside articesTable : $this-\>belongsToMany(‘Tags’);

**edit:**

**$article = $this-\>Articles-\>findBySlug($slug)-\>firstOrFail();**

**with this line cake is getting my article and all the associated tags? so inside the entity i should have it right?**

Thanks.
