Search:  

Using Form fields to specify meta description and meta keywords

You can specify the Meta Description and Meta Keywords for a page via the Behavior Editor, however this works per-page, and if the page contains variable information derived from a Form, it would be useful to be able to specify these values on a record-by-record basis in the Form.

This is possible to do, using either a Custom View component* or the Sale View component.

First add the fields to the Form which will contain the information, with the following data types. You only need add the fields you want.

  • Meta Description - Large Text
  • Meta Keywords - Large Text
  • Page Title - Text

The titles you give to the fields is not important, although keeping them as shown above would be sensible for clarity.

  1. Add a Query, and add the fields you have just defined.
  2. Add a Custom View or a Sale View, based on this Query.
  3. In the  View, select the fields from the dropdowns for Meta Description, Keyowrds, and Page Title.
  4. Click Update to save changes.
  5. Embed the View on the page that should show the meta tags.

Note: In most cases you will want the View to display other fields visibly on the page, but this is not necessary - and by default if you don't add any fields to the View then it will appear invisible. However, if you view the page source, you should be able to confirm that the meta tags are present.


* (This feature is not included in the Custom View provided bundled with the Query component, only with the separate Custom View component)

 

Copyright © 2023 Enstar LLC    All rights reserved Print this pageTranslate: