We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4095
    • 372 Posts
    I am trying to add a 2 metatags on a single page and I have tried to use the "META tags" option under resources.

    Problem is I want to add

    <meta name="robots" content="noindex, nofollow" />
    <meta name="googlebot" content="noindex, nofollow, noarchive, nosnippet" />

    If I add a tag with the value "Abstract" I get
    <meta name="abstract" content="noindex, nofollow" />

    If I try to use the Value "Robot" I get
    <meta name="robot" content="noindex, nofollow" />

    According to W3C it should be robots not robot, also this wont allow me to set googlebot

    See W3C and robostxt.org
    http://www.w3.org/TR/REC-html40/appendix/notes.html http://www.robotstxt.org/wc/meta-user.html

      [img]http://www.emanz.ac.nz/assets/images/logo/emanz-icon_16x16.gif[/img] Emergency Management Academy of New Zealand [br] http://www.emanz.ac.nz[br][br]MODx Sandbox Login: sandbox Password: castle [br]
      Admin Sandbox Login: sandbox Password: castle
      • 32241
      • 1,495 Posts
      Don’t you think it’s best to use TV?

      I use TV in my website, and it saves a lot of time in dealing with the current meta system on MODx. It also gives me a lot of flexibility in adding whatever that I want to it.
        Wendy Novianto
        [font=Verdana]PT DJAMOER Technology Media
        [font=Verdana]Xituz Media
        • 4095
        • 372 Posts
        Quote from: wendy at Jan 05, 2006, 05:12 PM

        Don’t you think it’s best to use TV?

        I don’t know thats why I was asking smiley

        I don’t know much about TV’s but having a quick look at it, I’m not sure how you get the META tags into the <head> area of the page rather than the <body>, which I could have done with a chunk.

        Do you have an example of how I might do it?
          [img]http://www.emanz.ac.nz/assets/images/logo/emanz-icon_16x16.gif[/img] Emergency Management Academy of New Zealand [br] http://www.emanz.ac.nz[br][br]MODx Sandbox Login: sandbox Password: castle [br]
          Admin Sandbox Login: sandbox Password: castle
          • 22303 MODX Staff
          • 10,725 Posts
          MODx can add META tags to pages in the same way it does Keywords. In the Manage Resources area, look under the META Keywords tab and you will see it actually has management for both Keywords and other META tags. These can then be placed into the page by simply selecting META tags from the list in the same way Keywords are selected (see the META Keywords tab when editing a document).
            • 4095
            • 372 Posts
            Thanks Jason, but using the method you suggested is what gives me the problem.

            1. The META tab in MODx does not allow you to create your own "value" type, you can only pick those in the list. Try using the tab to create a META tag with the name googlebot as below:

            <meta name="googlebot" content="noindex" />

            2. Using the robot value thats already in the list may be the incorrect syntax, according to the sites in my first posts. It would appear the value should be robots not robot, notice this missing S.

            Despite the syntax issue, it would only solve half the problem, I still want a googlebot tag as well, not just the generic robots tag

            3. Using chunks only adds it to the <body> section, whereas it needs to be in the <head> section. I have no experience using TV’s, but I couldn’t find a way to tell MODx to place the variable into the head section for the one page.

            4. Can’t add it to the template as I only want these tags to exist on ONE page.
              [img]http://www.emanz.ac.nz/assets/images/logo/emanz-icon_16x16.gif[/img] Emergency Management Academy of New Zealand [br] http://www.emanz.ac.nz[br][br]MODx Sandbox Login: sandbox Password: castle [br]
              Admin Sandbox Login: sandbox Password: castle
              • 32241
              • 1,495 Posts
              As to my understanding, you can include all MODx tag inside whichever are you want it to be. Take an example of chunk, you browse to your template, and place the chunk tag inside your <head></head> tag. That’s all.

              The bad thing in using chunk for meta, you will have the same meta tag all across the site, if you use the same template over and over again. So you can approach with TV, which all you need to do is create a new TV, and place the TV tag [*TV_NAME*] inside the <head></head> tag, then when you edit the page, you will have an option under your FCKEditor for that TV specific to that page only.

              Note: Don’t forget to assign the TV to your template when you create it.

              Hope that helps, but I believe this is not what MDx developer want us to do, so it’s up to you, using built in MODx meta tag system or use this workaround.

              Take care
                Wendy Novianto
                [font=Verdana]PT DJAMOER Technology Media
                [font=Verdana]Xituz Media
                • 25663 MODX Staff
                • 12,272 Posts
                You can add a chunk to anywhere in the document. I frequently use one myself to build common elements of the header for instance... my "stock" bag of tricks so to speak. However if you want to change it on some pages, create a TV as wendy suggests, give it a default value that’ll be used most of the time, then override that value on the pages that need it. Heck, you might even think about using it with the new @INHERIT binding that Adam created.
                  Ryan Thrash, MODX Co-Founder
                  Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                  • 32241
                  • 1,495 Posts
                  Hold on....

                  What is @INHERIT binding? Is that a new binding option for MODx? Man, I just know that we have a new binding option.

                  Shoot, I wish I can keep up with all the development of MODx.

                  Thanks for your tips.

                  One more question, can we use binding on the other binding? For example
                  @INHERIT @DOCUMENT 12


                  Is that do able?
                    Wendy Novianto
                    [font=Verdana]PT DJAMOER Technology Media
                    [font=Verdana]Xituz Media
                    • 4095
                    • 372 Posts
                    which all you need to do is create a new TV, and place the TV tag [*TV_NAME*] inside the <head></head> tag, then when you edit the page, you will have an option under your FCKEditor for that TV specific to that page only.

                    Ahh now I understand....just had to learn how to use TV’s. Wasn’t aware you can set TV’s in the template and then only make it active when viewing individual pages. I assumed if it was set in the template, it would be active on all pages.

                    Good stuff.... more I learn the more I realise how powerful MODx is cool
                      [img]http://www.emanz.ac.nz/assets/images/logo/emanz-icon_16x16.gif[/img] Emergency Management Academy of New Zealand [br] http://www.emanz.ac.nz[br][br]MODx Sandbox Login: sandbox Password: castle [br]
                      Admin Sandbox Login: sandbox Password: castle
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      It will be active, but it can be empty, or anything you want for that page.
                        Studying MODX in the desert - http://sottwell.com
                        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                        Join the Slack Community - http://modx.org