Jump to content

Description meta tag in Pages


Gabriel Torres
 Share

Go to solution Solved by Sonya*,

Recommended Posts

Hi,

With article in pages, the platform automatically creates the description meta tags based on the article contents. In our databases, we have a custom field with a summary that could be better used as description. Is there a way for us to use that field instead of the default behavior? If not, that is a suggestion that I leave for a future version. Ditto for the keywords fields.

Note: I know that I could adjust this manually using the SEO editor. however we have thousands of articles, using this editor is simply insane.

Thanks.

Edited by Gabriel Torres
Link to comment
Share on other sites

  • Solution

There is a workaround, if you would like to edit display record template. Add this on top of the template:

{{\IPS\Output::i()->metaTags['description'] = $record->customFieldDisplayByKey('YOUR_CUSTOM_FIELD', 'listing');}}
{{\IPS\Output::i()->metaTags['og:description'] = $record->customFieldDisplayByKey('YOUR_CUSTOM_FIELD', 'listing');}}

This would overwrite the default description meta tag with the value of your custom summary field.

Edited by Sonya*
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...