- This topic has 9 replies, 3 voices, and was last updated 1 year, 6 months ago by David.
August 8, 2019 at 4:20 pm #979423Steven
Is there a way to mark an Element so it can be added to the list of available Elements which can be disabled in the Layouts metabox in the block editor? If not, it would be great to see this as a setting for each Element. I also haven’t found a way to set which elements are disabled by default in the layout metabox in the block editor for pages. Thanks for any info you can pass along.August 8, 2019 at 5:08 pm #979447LeoStaffCustomer Support
Is there a way to mark an Element so it can be added to the list of available Elements which can be disabled in the Layouts metabox in the block editor
That’s not possible unfortunately.
I also haven’t found a way to set which elements are disabled by default in the layout metabox in the block editor for pages.
Not exactly sure what you are trying to achieve here but sometimes a filter solution might work:
You can see lots of examples if you search the filter name in our forum.
Let me know if this helps at all 🙂August 9, 2019 at 9:04 am #980053Steven
I was looking for a way to allow our page editors to choose if a custom Element we created was displayed on a page-by-page basis. And then in the theme settings specify which are selected by default for the Layout > Disable Elements in the page editor. That way we can control what most pages will be set for, but still allow the editors to override that for specific pages without giving them permission to make changes to the theme settings and defaults for all pages.
One use case is where we would like to create a custom hero header element that uses the feature image automatically. By default, we’d like that displayed on most pages. But there may be some pages where the editor would like to suppress that hero. With thousands of pages on our site, having a site admin add a display rule exception for each page will be unwieldy.August 9, 2019 at 9:23 am #980077DavidStaffCustomer Support
my current workaround to this issue is to use specific categories to make these types of page specific changes.
For example – Category: No Featured Image set as exclusion in my elements.
Then use a filter to remove these links from being displayed on the front end.
Just an alternative – but probably best to see what Tom comes back with on some of the related topics.August 9, 2019 at 9:40 am #980100Steven
I believe we’re currently using categories for pages to support our Media Library folders plugin. So I think it wouldn’t work on a page-by-page basis unless I’m missing something. Thanks for sharing your idea.August 9, 2019 at 10:03 am #980123DavidStaffCustomer SupportAugust 9, 2019 at 10:55 am #980178Steven
That could work, but it wouldn’t be an ideal user experience. Some elements would be disabled using the Layout metabox and then others would be disabled using the custom taxonomy category.August 9, 2019 at 11:32 am #980207DavidStaffCustomer Support
It would be no different to Disabling an Element using the Layout Metabox.
Page level controls seem awfully convenient at the time of adding a page or a post. But becomes a nightmare when X pages later you need to change them to something different.
Method using custom taxonomies:
Lets say we have the following elements set to display on all posts:
1. Header Element
2. Layout Element – for removing sidebar and reducing content width.
I register a Custom Taxonomy named e.g Layout Features. And add:
Now i can Exlcude that taxonomy in my Element Display Rules.
This gives me future proofing – lets say 100 posts later i no longer need the No Hero as fallback images have been accepted i can remove the exclude rule and delete my custom taxonomy tag.August 12, 2019 at 1:36 pm #982407Steven
Thanks for the background on the potential workaround.
I’m going to put a pin in this request for now. After digging in to the hero feature in GeneratePress, I’m unsure it’s going to work for us. It doesn’t currently support selecting the thumbnail rendition used for desktop and mobile – so the entire original is used as the background. Also, there’s no way to set the focal point on an image-by-image basis. This could be solved using the Theia Thumbnail Images plugin and a hero feature that supports specifying thumbnail renditions. There’s already a topic open for the hero thumbnail renditions request.August 12, 2019 at 2:49 pm #982441
- You must be logged in to reply to this topic.