We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42802
    • 96 Posts
    Sebastian Zahn | ingroove.uy Reply #1, 13 years, 5 months ago
    Please, is there a "template" with the seo meta tags integrated to modx resource fields to copy and paste in general projects?
    For example:

    <meta name="description" content="[[*description]]">
    <meta name="keywords" content="[[*metaKeywords]]"> //metaKeywords is the TV name i created for keywords

    I try Metax but it isn´t what i need.

    Is just for saving time in each project. If don´t exist i will make my own and share it with the community.
    Thanks!

    Sebastián.
      • 42046
      • 436 Posts
      I tend to train editors to use tailored longtitle's but use conditions for meta tags to give a fallback from the inevitable lazy editors.

      For example, in titles use:

      <title>[[*longtitle:default=`[[*pagetitle]] - your_extra_default_title`]]</title>


      Descriptions:

      <meta name="description" content="[[*description:default=`[[*content:limit=`160`]]`]]" />


      For keywords (even though Google and Bing ignore them), use a default value in your TV eg:

      [[*pagetitle]], your_extra_metatags
      [ed. note: absent42 last edited this post 13 years, 5 months ago.]
        • 42802
        • 96 Posts
        Sebastian Zahn | ingroove.uy Reply #3, 13 years ago
        Thanks! I take some time and made this, hope someone find it useful.

        <!--META TAGS-->
        <title>[[*pagetitle:escape]] | [[++site_name]]</title>
        <link rel="canonical" href="[[++site_url]][[~[[*id]]]]"/>
        <meta name="title" content="[[*pagetitle:escape]] | [[++site_name]]">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="keywords" content="[[*keywords]]">
        <meta name="description" content="[[*description:escape]]">
        <meta name="author" content="Montse Martínez">
        <meta name="date" content="[[*publishedon:strtotime:date=`%e %B %Y`]]">
        <meta name="lang" content="es">
        <meta name="robots" content="noindex,nofollow">
        <base href="[[++site_url]]">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="abstract" content="[[*introtext:escape]]">
        <meta name="author" content="www.website.com">
        <meta name="generator" content="MODX Revolution CMS">
        <link rel="icon" type="image/x-icon" href="assets/html/favicon.ico">
        <link rel="icon" type="image/png" href="assets/html/favicon.png">
        
        <!--Facebook Tags-->
        <meta property="og:site_name" content="[[++site_name]]">
        <meta property="og:type" content="article"/>
        <meta property="og:title" content="[[*pagetitle:escape]]">
        <meta property="og:description" content="[[*description:escape]]">
        <meta property="og:url"  content="[[++site_url]][[~[[*id]]]]">
        <meta property="og:image"  content="[[*SocialImage]]">
        <meta property="og:description" content="[[*description:escape]]">
        
        <!--Twitter Card-->
        <meta name="twitter:card" content="summary">
        <meta name="twitter:site" content="@direccionTwitter">
        <meta name="twitter:creator" content="@usuarioTwitter">
        <meta name="twitter:title" content="[[*pagetitle:escape]]">
        <meta name="twitter:description" content="[[*description:escape]]">
        <meta name="twitter:image" content="http://sebastianzahn.com/modx1/[[*SocialImage]]">
          
        <!--FIN TAGS-->


        :)