# Random CMS - custom component

**URL:** <https://forums.realmacsoftware.com/t/random-cms-custom-component/56422>\
**Category:** Elements CMS\
**Created:** [May 30, 2026, 9:35am UTC](https://forums.realmacsoftware.com/t/random-cms-custom-component/56422 "2026-05-30T09:35:04Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![upssjw](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/upssjw/32/26063_2.png) [@upssjw](https://forums.realmacsoftware.com/u/upssjw)\
**Post date:** [May 30, 2026, 9:35am UTC](https://forums.realmacsoftware.com/t/random-cms-custom-component/56422/1 "2026-05-30T09:35:04Z")

</div>

CMS custom component, have shown before, but extra functions

ok I have only 3 images setup you can add more

This randomly selects an image, the relative link, text color and the link text

Highlight a different product or page as you land on the page, every refresh or visit

Elements CMS is really cool 😀 😀 😂 😂

---

<div class="post-metadata">

**Author:** ![Pegasus](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/pegasus/32/25035_2.png) [@Pegasus](https://forums.realmacsoftware.com/u/Pegasus)\
**Post date:** [May 30, 2026, 2:10pm UTC](https://forums.realmacsoftware.com/t/random-cms-custom-component/56422/2 "2026-05-30T14:10:03Z")

</div>

**Where and when can you buy that?**

---

<div class="post-metadata">

**Author:** ![upssjw](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/upssjw/32/26063_2.png) [@upssjw](https://forums.realmacsoftware.com/u/upssjw)\
**Post date:** [May 30, 2026, 2:10pm UTC](https://forums.realmacsoftware.com/t/random-cms-custom-component/56422/3 "2026-05-30T14:10:29Z")

</div>

add some controls, part controlled by CMS the rest Elements

Home is the only page random image/text is used the other pages are just pages, the random image text link the other pages

might be of use, project - [elementsapp://downloadDocument/LbAUsiZqvuiE](elementsapp://downloadDocument/LbAUsiZqvuiE)

leave until tomorrow, uses up space

if you need to point at different md folder and md frontmatter

---

<div class="post-metadata">

**Author:** ![upssjw](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/upssjw/32/26063_2.png) [@upssjw](https://forums.realmacsoftware.com/u/upssjw)\
**Post date:** [May 30, 2026, 2:10pm UTC](https://forums.realmacsoftware.com/t/random-cms-custom-component/56422/4 "2026-05-30T14:10:41Z")

</div>

just posted free

you could add more in the frontmatter and change the component

let me know if there are any bugs

---

<div class="post-metadata">

**Author:** ![Pegasus](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/pegasus/32/25035_2.png) [@Pegasus](https://forums.realmacsoftware.com/u/Pegasus)\
**Post date:** [May 30, 2026, 2:12pm UTC](https://forums.realmacsoftware.com/t/random-cms-custom-component/56422/5 "2026-05-30T14:12:13Z")

</div>

Basically, it would be really nice to have a **“random item”** function in the CMS and in the related item.

Adding **whitelist and blacklist filters for the tags** would make the whole thing ideal.

---

<div class="post-metadata">

**Author:** ![Pegasus](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/pegasus/32/25035_2.png) [@Pegasus](https://forums.realmacsoftware.com/u/Pegasus)\
**Post date:** [May 30, 2026, 2:12pm UTC](https://forums.realmacsoftware.com/t/random-cms-custom-component/56422/6 "2026-05-30T14:12:33Z")

</div>

THANK YOU SO MUCH! 🙂

---

<div class="post-metadata">

**Author:** ![upssjw](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/upssjw/32/26063_2.png) [@upssjw](https://forums.realmacsoftware.com/u/upssjw)\
**Post date:** [May 30, 2026, 2:18pm UTC](https://forums.realmacsoftware.com/t/random-cms-custom-component/56422/7 "2026-05-30T14:18:29Z")

</div>

no probs, I added project in my previous to last post,

would white black lists be possible in normal CMS

Adding **whitelist and blacklist filters for the tags** would make the whole thing ideal

---

<div class="post-metadata">

**Author:** ![Pegasus](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/pegasus/32/25035_2.png) [@Pegasus](https://forums.realmacsoftware.com/u/Pegasus)\
**Post date:** [May 30, 2026, 2:23pm UTC](https://forums.realmacsoftware.com/t/random-cms-custom-component/56422/8 "2026-05-30T14:23:22Z")

</div>

> [@upssjw](#):
>
> Adding **whitelist and blacklist filters for the tags** would make the whole thing ideal

@ben  
I think I mentioned this topic before. It’s already on your to-do list, right?

Could you maybe “accidentally” move it a bit higher up the priority list?  
That would also be worth something to me as a paid Pro feature. 🫣

---

<div class="post-metadata">

**Author:** ![upssjw](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/upssjw/32/26063_2.png) [@upssjw](https://forums.realmacsoftware.com/u/upssjw)\
**Post date:** [May 31, 2026, 2:46pm UTC](https://forums.realmacsoftware.com/t/random-cms-custom-component/56422/9 "2026-05-31T14:46:43Z")

</div>

different project, took a little longer to create, mostly layout in flex

using as a flat data base, set control so far only on card backgrounds

---

<div class="post-metadata">

**Author:** ![upssjw](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/upssjw/32/26063_2.png) [@upssjw](https://forums.realmacsoftware.com/u/upssjw)\
**Post date:** [June 1, 2026, 8:34am UTC](https://forums.realmacsoftware.com/t/random-cms-custom-component/56422/10 "2026-06-01T08:34:29Z")

</div>

ok another take the array can contain different titles / data, not have data and have data, also editing in ftp - have been editing already, just update a spelling mistake. I would just download the md file and put into the project to keep synced

website - [https://sjwjaw.co.uk](https://sjwjaw.co.uk)

---

<div class="post-metadata">

**Author:** ![Pegasus](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/pegasus/32/25035_2.png) [@Pegasus](https://forums.realmacsoftware.com/u/Pegasus)\
**Post date:** [June 1, 2026, 12:02pm UTC](https://forums.realmacsoftware.com/t/random-cms-custom-component/56422/11 "2026-06-01T12:02:14Z")

</div>

Really cool stuff. I just need more hours in the day to really spend some proper time digging into it.

---

<div class="post-metadata">

**Author:** ![upssjw](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/upssjw/32/26063_2.png) [@upssjw](https://forums.realmacsoftware.com/u/upssjw)\
**Post date:** [June 1, 2026, 12:13pm UTC](https://forums.realmacsoftware.com/t/random-cms-custom-component/56422/12 "2026-06-01T12:13:56Z")

</div>

I started here, control flow and conditionals, then followed the links to the twig site, takes longer to create the tailwind code to define the layout than set the twig up

[https://docs.realmacsoftware.com/elements-docs/cms/cms/twig](https://docs.realmacsoftware.com/elements-docs/cms/cms/twig)
