Knowledge base/Tips & Tricks

Edit Meta Tags

Technical Support
posted this on January 05, 2010 12:22

Place a dynamic text in the meta tags

  1. Switch on the WORKBENCH from the "templates" menu

  2. Open any product page (i.e. Hotel details)

  3. Click on the link EDIT beside CANVAS (see attached screenshot), the template editor will appear in a new window.

  4. Replace the static "keywords" meta tag you will find in the html code with the following code snippet. Note that we use the variable %-components.closeup.product.leaflet3-% to load your keywords ("leaflet3" corresponds to the DETAILS tab of the Descriptions menu in the administration area)

    <%SHOWIF '%-components.closeup.product.name--isdefined-%' > 
    <meta name="keywords" content="%-components.closeup.product.leaflet3-%" />
    </%SHOWIF>
    <%SHOWIF !'%-components.closeup.product.name--isdefined-%' > 
    <meta name="Keywords" content="some generic keyword that match your business and products" />
    </%SHOWIF>
  5. Confirm by clicking 'publish'

  6. Go to the DETAILS tab of the DESCRIPTIONS menu in the administration area and enter your keywords

    metatags1.png

 

 

Use Product Name in the meta tags

If you just need the Hotel Name instead of some custom frase, you can easily use the %-product.name-% to do it:

  1. Switch on the WORKBENCH from the "templates" menu

  2. Open any product page (i.e. Hotel details)

  3. Click on the link EDIT beside CANVAS (see attached screenshot), the template editor will appear in a new window.

  4. Place the variable %-components.closeup.product.name-% in the appropriate meta tag (i.e. "keywords")

  5. Confirm by clicking 'publish'

 

editcanvas.png

 

Use Virtual Fields for the meta tags

If you plan to use the "Details" field described above to host more than just keywords as explained in the article http://support.touristway.com/forums/4369/entries/21573 you can create a virtual field just for the content of this meta tag:

metatags2.png

This is the code snippet adapted to use the new virtual field "mykeywords"

<%SHOWIF '%-components.closeup.product.name--isdefined-%' > 
<meta name="keywords" content="%-components.closeup.product.leaflet3--chunk=mykeywords-%" />
</%SHOWIF>
<%SHOWIF !'%-components.closeup.product.name--isdefined-%' > 
<meta name="Keywords" content="some generic keyword that match your business and products" />
</%SHOWIF>
 
Topic is closed for comments