Announcement

Collapse
No announcement yet.

Page SEO; Title, Keywords and Description fields should support snippets.

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Page SEO; Title, Keywords and Description fields should support snippets.

    Page SEO; Title, Keywords and Description fields should support snippets.

    Title Field: &mvt:breadcrumbs:current_item:name;, Holiday Gifts.



  • Bruce - PhosphorMedia
    replied
    Try this:

    Code:
    <mvt:if expr="g.screen NE CTGY OR g.screen NE PROD">
    
       <mvt:if expr="NOT ISNULL l.settings:page_metafields:title">
          <title>&mvt:page_metafields:metafield:title;</title>
       <mvt:else>
          <title>Buy &mvt:category:name; at SomeGreateDomain.com</title>
       </mvt:if>
    
       <mvt:comment>Category Description Meta Tag</mvt:comment>
       <mvt:if expr="NOT ISNULL l.settings:page_metafields:description">
          <meta name="description" content="&mvt:page_metafields:description;" />
       <mvt:else>
          <meta name="description" content="&mvt:page:name;" />
       </mvt:if>
    
    <mvt:elseif expr="g.screen EQ CTGY">
    
       <mvt:if expr="NOT ISNULL l.settings:category:metafield:title">
          <title>&mvt:category:metafield:title;</title>
       <mvt:else>
          <title>Buy &mvt:category:name; at SomeGreateDomain.com</title>
       </mvt:if>
    
       <mvt:comment>Category Description Meta Tag</mvt:comment>
       <mvt:if expr="NOT ISNULL l.settings:category:metafield:description">
          <meta name="description" content="&mvt:category:metafield:description;" />
       <mvt:else>
          <meta name="description" content="Shop our selection of &mvt:category:name;, in stock and on sale. Purchase here or shop for similar products. Free shipping offer." />
       </mvt:if>
    
    <mvt:elseif expr="g.screen EQ 'PROD'">   
    
       <mvt:if expr="NOT ISNULL l.settings:product:metafield:title">
          <title>&mvt:product:metafield:title;</title>
       <mvt:else>
          <title>Buy &mvt:product:name; at SomeGreateDomain.com</title>
       </mvt:if>
    
       <mvt:comment>product Description Meta Tag</mvt:comment>
       <mvt:if expr="NOT ISNULL l.settings:product:metafield:description">
          <meta name="description" content="&mvt:product:metafield:description;" />
       <mvt:else>
          <meta name="description" content="Shop our selection of &mvt:product:name;, in stock and on sale. Purchase here or shop for similar products. Free shipping offer." />
       </mvt:if>
    
    </mvt:if>
    This goes in place of whatever/wherever your existing title resides.

    Leave a comment:


  • William Davis
    replied
    Originally posted by Bruce - PhosphorMedia View Post
    you probably need to call the breadcrumb item first...but since that variable is just the page name or cat/prod name just use that instead.
    Bruce, I am relatively new to this platform, can you please elaborate a little?

    Leave a comment:


  • Bruce - PhosphorMedia
    replied
    you probably need to call the breadcrumb item first...but since that variable is just the page name or cat/prod name just use that instead.

    Leave a comment:


  • William Davis
    replied
    Originally posted by Bruce - PhosphorMedia View Post
    Instead of using the Meta data inputs, just add them to the global head tag. The Meta data inputs are precisely for when you want to use non-dynamic content. You could (should) write the dynamic code inside a test for when there is NO specific meta tag data for a given page. (That's actually how the original CSSUI was written if I remember correctly.)
    It was not able to successfully render the following for me:

    Title Field:
    Code:
    &mvt:breadcrumbs:current_item:name;, Holiday Gifts.

    Leave a comment:


  • Bruce - PhosphorMedia
    replied
    Instead of using the Meta data inputs, just add them to the global head tag. The Meta data inputs are precisely for when you want to use non-dynamic content. You could (should) write the dynamic code inside a test for when there is NO specific meta tag data for a given page. (That's actually how the original CSSUI was written if I remember correctly.)

    Leave a comment:

Working...
X

This website uses cookies to identify visitors, track visitors to our website, store login session information and to remember your user preferences. By continuing to use this site you agree to our use of cookies. Learn More.

This website uses cookies. By continuing to use this site you agree to our use of cookies. Learn More.

Accept