# Hiding specific Dynamic content on some of my Dynamic pages

**URL:** <https://forum.wixstudio.com/t/hiding-specific-dynamic-content-on-some-of-my-dynamic-pages/57485>\
**Category:** Ask the community\
**Tags:** wix-studio, cms\
**Created:** [March 24, 2024, 2:25pm UTC](https://forum.wixstudio.com/t/hiding-specific-dynamic-content-on-some-of-my-dynamic-pages/57485 "2024-03-24T14:25:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert\_Davenport](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/robert_davenport/32/83526_2.png) [@Robert\_Davenport](https://forum.wixstudio.com/u/Robert_Davenport)\
**Post date:** [March 24, 2024, 2:25pm UTC](https://forum.wixstudio.com/t/hiding-specific-dynamic-content-on-some-of-my-dynamic-pages/57485/1 "2024-03-24T14:25:05Z")

</div>

Hiding specific Dynamic content on some of my CMS driven pages. basically some of the pages I’ve dynamically generated dont have the same info as other dynamically generated pages. So, on those pages I would like to hide the content. Is that possible?

WIX Studio

Cheers  
Rob

---

<div class="post-metadata">

**Author:** ![codequeen](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/codequeen/32/88960_2.png) [@codequeen](https://forum.wixstudio.com/u/codequeen)\
**Post date:** [March 24, 2024, 3:47pm UTC](https://forum.wixstudio.com/t/hiding-specific-dynamic-content-on-some-of-my-dynamic-pages/57485/2 "2024-03-24T15:47:25Z")

</div>

**The easy non code way?**

Change your URL pattern. Pick a field that the group of pages all share so only those items get a dynamic page.

For example, let’s say your data was Name, Type, Brand, Description, Edible

And let’s say your items where:

- Apple, Food, (empty brand field), Some description
- Yellow Car, Vehicle, Ford, Some description , (empty edible field)
- Blue Truck, Vehicle, Chevy, Some description , (empty edible field)

So if I wanted the Apple NOT to have a dynamic page then I would probably choose this URL pattern:

.com/page/{name}/{brand}/{id}

Only the items that have the Brand field filled out will generate a dynamic page for this pattern.

Then i could create a totally new dynamic page with a different URL pattern:

.com/page/{name}/{edible}/{id}

That way only the items with something in the Edible field get THAT dynamic page created.

So 2 dynamic pages with 2 different designs for the appropriate items, etc.

**The Code way:**

Build your dynamic page into sections or strips. When the page loads check the current item. Check each field. If field is not empty, expand to show the appropriate element on the page.

> **[onReady - Velo API Reference - Wix.com](https://www.wix.com/velo/reference/wix-dataset/dataset/onready)**
>
> Adds an event handler that runs when the dataset is ready. The onReady() function allows you to optionally perform actions right after the dataset has loaded ...

> **[getCurrentItem - Velo API Reference - Wix.com](https://www.wix.com/velo/reference/wix-dataset/dataset/getcurrentitem)**
>
> Returns the current item. The getCurrentItem() function returns an object whose key:value pairs are the field IDs and field values of the current item, ...

> **[expand - Velo API Reference - Wix.com](https://www.wix.com/velo/reference/$w/collapsedmixin/expand)**
>
> Expands the element and sets its collapsed property to false. The expand() function returns a Promise that is resolved when the element's collapsed property ...
