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
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.