rapila / cms-base

The rapila cms’ internals. Please file all issues here if they’re not directly related to a plugin or the sample site.
http://www.rapi.la
3 stars 1 forks source link

Metatags save as PageProperties (i.e. robots) #262

Open juergmessmer opened 3 years ago

juergmessmer commented 3 years ago

My suggestion, or attempt:

  1. Add metatag name "robots" to template that includes head, and replace pageProperty as follows:

    <meta name="robots" content="{{pageProperty=meta_robots;defaultValue=index}}" />
    <meta name="googlebot" content="{{pageProperty=meta_robots;defaultValue=index}}" />

This works as soon as I manually enter a page_properties row with the page_id, the name "meta_robots" and the value "noindex".

  1. In page admin the page property meta_robots is shown, but without value, but with the info default index next to the form field.

Finally I found out, that this is already possible.

juergmessmer commented 3 years ago

Question: would it make sense to allow multiple use of same PageProperty in html, in order to replace it with same value, and ignore any further "available" identifier of the same name (in getAvailablePageProperties()), once it's set?

juergmessmer commented 3 years ago

Possible solution: branch https://github.com/rapila/cms-base/tree/page_property_multiple_use