Site logo

Archived topic

Elements On Various Pages/Posts

9 replies · Started by Brent Wilson on March 10, 2022

Viewing posts 1–10 of 10

Is there a way to set one element to display on the entire site, but then have other elements that are meant to take the place of that entire site element on certain pages or posts?

So:

Element A - display rule: entire site

Element B - display rule: specific page

For Element B to replace Element A on a specific page, do I need to both include that specific page in the display rules for Element B, AND ALSO exclude that specific page in the display rules for Element A?

Or is there a way (maybe through priority or something?) to just have Element B automatically replace Element A on that specific page just by setting the display rule for Element B to that page?

Hi Brent,

For this, the safest route would be to set Exclude rules in the Display Rules settings.

See: https://share.getcloudapp.com/JruONn66

However, if you’re referring to the style we were adding through a Hook Element in the previous conversation, adding a higher priority would overwrite the lower priority in terms of CSS.

See: https://share.getcloudapp.com/12ug6PNZ

In other cases though, as mentioned, setting Exclude rules would be most ideal to make an Element not appear in certain pages.

Hope this clarifies. :)

So basically, if I have two competing elements, I need to add it to a page/post in one element and exclude it from that page/post in the other element? So basically each time I add an additional page, I would need to go into both elements and add the page in one and exclude the page in the other?

What I would like would be to just set one element to the entire site, and then only have to add pages/posts to the other element and have it override the site-wide element on those specific pages/posts. Is this not how elements work?

What would the content of Element B be?

Could you just add the content of that element directly into the page if it's only used for that page?

It could be a decorative sidebar in a different color that I want to apply to multiple pages and certain post taxonomy terms. Or a different footer that I want to apply to certain post taxonomy terms and various individual pages. Etc.

So say I want the site-wide default footer to be built with a block element with a red background. But then I want a block element footer with a blue background applied to certain pages and post taxonomy terms. So do I need to edit both the red footer (exclude a list of pages and terms) and the blue footer (apply to the list of pages and terms)? Or is there a way to only have to edit one of the elements instead of both when I want to apply the blue footer to additional pages and terms?

But am I understanding the display rules correctly in that one element needs to have exclusions added, while the other element needs to have display locations added? So with display rules, I am going to need to edit two different elements and the display rules on one element can't simply override the site-wide element?

That's basically correct.

The elements themselves don't have priority there is really no "overwriting" in them.

Okay. Thanks!

No problem :)

This archived topic is closed to new replies.