I love master pages in PG. It’s easy to tag elements as editable on different pages which are using one master page.
But I can’t find a solution for this case:
-I love to use master pages to keep the head updated on all pages (e.g. for analytics)
-I made parts of the head like title editable because it shall be unique on all pages
-But I don’t know the best way to add optional head meta tags like no index or other unique tags on just a few pages. When I make the whole head editable, new tags or updates I do to the master pages head won’t appear on all the other pages using this master page or am I wrong?
Hi @Riccarcharias,
I think the best way is to add a catch all and then any specialized meta tags that you think you will need on the Master page. Make those that are not needed on every page optional. So for example, you could have:
<meta name="" content="">
Within the actions make it optional so that you can delete it on child pages. Unclick the inner content and make both the content and name editable. This will work for a wide variety of uses, like robot or googlebot noindex.
After you implement this on your Master you will need to check the “Restore on update” in the Define Optional Area action. You also need to toggle this if you delete it off a child page and then need it back.
You can do this same thing to add in the other common ones, like <meta property="" content=""> or <meta http-equiv="" content="">. You could also do one for <link> I suppose.
Thanks so much for your answer! I hope it will help others in the future, too.
I haven’t fully understood the optional area:
If I leave restore on update blank, the element will appear on all new pages which are using this master page. And when I delete the element on one page, it won’t come back when I update?
If I check restored on update then the element will come back after updating. This makes only sense when I want to add this element to the master page and bring it to all the other pages. Or when I want to bring the element (which I deleted earlier on one page) back (check restore on update > update only this one page > uncheck restore on update).
Hi @Riccarcharias,
The optional area will allow you to delete the tag if not needed. The element will appear on any new page, but not existing pages unless you check the box and do the restore on open pages. So yes, you understand perfectly.
Cheers,
Bob