We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19638
    • 39 Posts
    How-To use META-tags and Keywords feature in MODx

    (for MODx version 0.9.5)

    Short FAQ :
    Q: Did i have to use a special TV in my template to use the MODX META-Tag/Keyword default feature ?
    A: No. The default META-Tag feature is independant from the template engine, if you have manualy added META information in your templates/chunks they may be duplicated. So please check first than a META information is used only once, either in the manager or manually inserted in your template.
    Q: Did this feature is by default activated ?
    A: No. You can manage META stuff completly in your templates/chunks if your prefer with no inteference with the default MODx instaled META-Tags. If you want to activate it you have to do it per/page basis.

    How to add a META-Tag/keyword step-by-step :

    • 1 : Into the manager, go to ressources -> Manage META-Tag and Keywords
    • 2 : Add/remove or change the default META/keywords in this page. Be careful the page is not actualy (0.9.5) very consistant in the Add-Delete order (Add Meta/change-delete Meta/change-delete keyword/Add Keyword).
    • 3 : Go to the page you want to activate them, e.g. "Home" page.
    • 4 : Click on "Edit" and on "META Keywords".
    • 5 : Click on the META and keywords you whant to activate. Use CTRL+click (cmd-click on Macs) if you want to activate more than one.
    • 6 : Click on the "Save" buton at the top of the page. The Feature is "automatic" you don’t have to add a TV in your templates.
    • 7 : Go to preview the page and check the source in your browner to see if everything worked as expected.


    Note : The feature is (as I understand) implemented on a per-page basis undecided so it may not be very convenient to use them in a huge site. Here is a template trick as a workaround to modify them with quickedit without the use of the manager.
    1) The "Description" META Tag :
    Add the following code into your template between <head> and </head> balises.
    <head>
    <meta name="description" content="[*description*]" />
    </head>
    2) The "Keywords" META Tag :
    <head>
    <meta name="keywords" content="[*introtext*]" />
    </head>
    This last one is a realy a "bad" trick.. Is better to avoid it but ....

    Questions needing answers :
    1) Is there a way to activate the defined META & keywords "in one click" on all pages ? --> See reply from Banzai about @INHERIT method smiley
    2) Did the developer will work on the META administration in future ?
      • 25423
      • 47 Posts
      Meta Tags don’t work in chunks(

      tpl:
      -----------
      {{top}}
      ......
      {{bottom}}
      -----------

      top:
      -----------
      ....
      <head>
      ....
      </head>
      ....
      -----------


      Excuse for my bad English
        Excuse for bad English
        • 19638
        • 39 Posts
        You can do like this for a META-Tag chunk

        <head>
        {{META_Tag_chunk}}
        </head>

        And for ex. create this {{META_Tag_chunk}} chunk :


        <title>[(site_name)] :: [*pagetitle*]</title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <meta name="keywords" content="keyword1, keyword2, keyword3, keyword4, keyword5" />
        <meta name="description" content="[*description*]" />
        <link rel="stylesheet" type="text/css" href="[(rb_base_url)]templates/MyTemplate/default.css" />
        <link rel="stylesheet" type="text/css" href="[(rb_base_url)]templates/MyTemplate/print.css" media="print" />
        <link rel="shortcut icon" href="[(rb_base_url)]templates/MyTemplate/favicon.ico" />
        etc. In this case you can add all the <head> elements into this chunk.
          • 2762
          • 1,198 Posts
          In MODx you ever have several ways to do the same thing.

          ie: you have a big website with reviews of hitech products, so you have some big categories (folders) like:

          webdesign,
          software,
          cms,
          apple,
          Microsoft....

          A) Using metatags list menu:

          In latest MODx 0.9.5 we have added ’’keywords’’ in the tag list menu too, so you can fast create several groups of keywords.

          ie: keywordsforwebdesign, keywordsforsoftware, keywordsforcms....

          and apply using manager page settings.

          B) using @INHERIT in a tv:


          1) create a tv called ’keywords’ with default value @INHERIT

          2) add <meta name="keywords" content="[*keywords*]" /> in you template

          3) put your favorite keywords in the tv ’keywords’ ONLY in the home category page (ie www.yoursite.com/webdesign.html ) and leave the default value @INHERIT for all the articles pages inside the gategories.

          4) done. smiley
            Free MODx Graphic resources and Templates www.tattoocms.it
            -----------------------------------------------------

            MODx IT  www.modx.it
            -----------------------------------------------------

            bubuna.com - Web & Multimedia Design
            • 2762
            • 1,198 Posts
            working on a realestate website i’m using another way to add good keywords to pages:

            I have a lot of real estate announcements, published via a NewsPublisher mod with tv.
            So i have lot of pages with more tv like city,state,room,sell..

            I use all fields from newspublisher to create custom metatags, to automatically create tags for posts(real estate announcements):

            ie:

            <meta name="keywords" content="[*state*], [*city*], [*pagetitle*].... />
            <meta name="description" content="[*introtext*]" />



              Free MODx Graphic resources and Templates www.tattoocms.it
              -----------------------------------------------------

              MODx IT  www.modx.it
              -----------------------------------------------------

              bubuna.com - Web & Multimedia Design
              • 19554
              • 59 Posts
              Wikified: http://wiki.modxcms.com/index.php/META_tags
              Please update with any later changes. Thanx!
                • 11429
                • 90 Posts
                I need some clarification re: meta and key words in Modx,

                I understand Modx is going to be remade from the core and would like to have a better understanding
                of the meta/keyword setup in the current version, there seems to be a multitude of ways to set it up and i’m not sure which should be used and/or which is the method most are using.

                In the manage meta tags and keywords section, you have meta tags and you have keywords,
                it appears that keywords is to set certain key words on a per page basis, if this is so then what is the need for having a tv called keywords ? are they same or different ?

                Sounds like good sense to have individual keywords that can be added based on the flavor of the page along with its description and since Modx already has manage meta tags and keywords, it would also make good sense to utilize what Modx already has vs trying to use snippets and tvs, etc

                The metatagsextra seems to be a handy tool as well but i guess it’s not wise to use both this and the Modx setup

                From what i hear the new Modx is going to be out of this world, wish it was soon, the anticipation is getting the best of me.

                Anyone care to provide some approaches to handling meta and keywords ?