Site logo

Archived topic

New Elements Module versus Page Header Legacy

7 replies · Started by Cory on August 2, 2018

Viewing posts 1–8 of 8

I installed the Beta on a test site and love how the new Elements module will work. However, I have a question regarding how long the Page Headers' legacy meta box and general existence of it in the future.

With some lesson posts that I am doing I use various Headers I created with custom fields. Then, I really like how while I am in the post itself, I can go into page headers and then choose one of the various Headers I created based on what custom fields I have filled out. Sometimes, as I am creating the lesson, I will change my mind on the page header of choice and just need to go back into the meta box and choose a new one.

Now, I know I can go into the new elements section and choose the header for each individual post there. But, the list is going to get very long as I add hundreds of posts and choose the different page headers.

So, I actually prefer for this post type that I choose them individually using the legacy header meta box, etc.

To cut to the chase, do you think that the legacy headers will still be included in years to come, or should I use Elements even if it means that I'll have hundreds of location rules for each post?

Thanks!

Cory

Hi Cory,

Page Headers won't ever be removed completely, as doing so would break tons of websites.

That being said, they won't continue to receive updates (new features, bug fixes etc..) in the future.

It's a matter of preference, but I think I would prefer to use Display Rules in this scenario. That way I have an overview of every lesson that the Page Hero is applied to, right in front of me.

Having to look inside hundreds of different lessons to check the Page Header could become pretty brutal I'd think.

That being said, you're completely free to do so. Backwards compatibility is something I take very seriously :)

Yes - there's definitely a plus for seeing them in 1 location like that.

Is something like this possible in Elements - and could you help me out in what code I would use?

Basically, I have about 8 custom fields that I use that are all just different links to different media. Sometimes I put a youtube video in the header, sometimes a wistia video, sometimes an iframe, etc. So, I made headers for each scenario and within them there's some custom field text that get's pulled in specific to the media.

My thought is that I could make 1 Header for all them using If and Then type of statements.

If there is data in the custom field {{custom_field.youtube}} then display it.
If there is data in the custom field {{custom_field.youtube}} then display it.

I don't know if this is possible to write something like this in the element code?

Could you point me in the right direction if this is a possibility?

Thanks.

Cory

There are no conditional template tags unfortunately.

Not possible to just have one meta key, and use that key with whatever value on each page?

I thought of that, but I have some different things happening where sometimes I load a couple of iframes in the top header and use some javascript to create a TAB to choose between them and I load the TAB name from a custom field as well in the header.

So, all this to say if I can use both methods in the long term, that will work nicely. Thanks for considering backward compatibility.

Cory

One last question:

- What will happen if you set up a condition where the Elements module pulls a header for all posts of a custom post type. And then, I decide that I want to use a legacy page header, so I go into the meta boxes of the post and pick a legacy header template?

Would the legacy header take importance over the Element module that sets a global condition on those custom post types?

Cory

I believe in that case they would both display on the page.

OK - thanks for the replies Tom.

Cory

This archived topic is closed to new replies.