# Related items not working…

**URL:** <https://forums.realmacsoftware.com/t/related-items-not-working/52859>\
**Category:** Elements\
**Created:** [November 29, 2025, 1:38pm UTC](https://forums.realmacsoftware.com/t/related-items-not-working/52859 "2025-11-29T13:38:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MichaelDroste](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/michaeldroste/32/37212_2.png) [@MichaelDroste](https://forums.realmacsoftware.com/u/MichaelDroste)\
**Post date:** [November 29, 2025, 1:38pm UTC](https://forums.realmacsoftware.com/t/related-items-not-working/52859/1 "2025-11-29T13:38:38Z")

</div>

According to robot:

Here’s a quick setup:

1. **Ensure Your Page is PHP:** Make sure your page uses a `.php` extension since CMS components need it.
2. **Add a Collection:** Use the Collection component for listing data.
3. **Include Related Items:** Within your Collection or Static Item, drop the Related Items component. This will auto-fetch and display items related to the current context.
4. **Style with Tailwind:** You can add Tailwind classes for styling it to match your design.
5. 

Mine isn’t doing #3 auto fetching - got an 8 song test with tags…

---

<div class="post-metadata">

**Author:** ![jbob](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/jbob/32/31581_2.png) [@jbob](https://forums.realmacsoftware.com/u/jbob)\
**Post date:** [November 29, 2025, 1:42pm UTC](https://forums.realmacsoftware.com/t/related-items-not-working/52859/2 "2025-11-29T13:42:35Z")

</div>

I dont think tags work yet

---

<div class="post-metadata">

**Author:** ![jbob](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/jbob/32/31581_2.png) [@jbob](https://forums.realmacsoftware.com/u/jbob)\
**Post date:** [November 29, 2025, 1:49pm UTC](https://forums.realmacsoftware.com/t/related-items-not-working/52859/3 "2025-11-29T13:49:14Z")

</div>

You could try turning off ‘by tags’ … then preview in browser and see if that works

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/4/4/44bb1dde02d800286b9e6411aa1aab9115af233a.png)

Make sure ‘Related Items’ is under ‘Item’ in your ‘Page Layout’ Tree

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/6/8/68a874dbdfba9bf177953ef5b567e44afe04756f.png)

Also — make sure you name your page xxx.php

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/8/b/8b54243e1f4759c88419037fae3654d26c08cb5b.png)

---

<div class="post-metadata">

**Author:** ![MichaelDroste](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/michaeldroste/32/37212_2.png) [@MichaelDroste](https://forums.realmacsoftware.com/u/MichaelDroste)\
**Post date:** [November 29, 2025, 3:09pm UTC](https://forums.realmacsoftware.com/t/related-items-not-working/52859/4 "2025-11-29T15:09:36Z")

</div>

Don’t know where I got this code ‘saved’ it . Maybe from CMS manual documents?

```auto

Related Tags Code

@raw()
    {% if item.tags %}
        <div class="tags">
            {% for tag in item.tags %}
                <span class="tag">
                    {{tag.name}}
                    {% if tag.description %}
                        <span class="tag-description">{{tag.description}}</span>
                    {% endif %}
                </span>
            {% endfor %}
        </div>
    {% endif %}
@endraw()

{{genre|join(', ')}}{{mood|join(', ')}}{{instrumentation|join(', ')}}

```

Thought maybe needed to use above?

Don’t know at all… I’m a trial and error person  
Trying to make it work… read the manuals and try…
