We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40988
    • 6 Posts
    Hello,

    I am relatively new to MODX Revo and cannot get around this.

    I installed the GoogleSiteMap Addon (http://rtfm.modx.com/display/ADDON/GoogleSiteMap) and now want to set custom priorities for some documents I have created. In the changelog I found something of "added priorityTV" which means as far as I can tell that somehow it should be able to change the priority by adding a template variable. So thats what I did, assigned it to the already existing category "GoogleSiteMap", granted access to the templates I have been using, change the value and TADAAA nothing changed on my sitemap.xml.

    So what am I doing wrong? How can I set a priority in my resources which is reflected in the sitemap created by the addon?

    I tried to reach the code which has changed (https://github.com/splittingred/GoogleSiteMap/commit/4add84d3d028c0a3a3b1816d247d577e567c9cb8) but that did not help me.

    Your insights are highly appreciated!

    Thanks,
    P

    This question has been answered by peterm. See the first response.

      • 40988
      • 6 Posts
      Any hints, please? smiley
        • 40988
        • 6 Posts
        Anyone?
          • 40988
          • 6 Posts
          I guess that means nobody....
            • 3109 ☆ A M B ☆
            • 894 Posts
            I'm not sure what your trying to do, when you say priority what exactly are you trying to achieve? The priority on how google indexes the xml again? Not sure I follow what you want to do .

            In order to access the TV you created in the xml you need to add it to your tpl otherwise you will never see the value of that TV in the xml.
              Benjamin Marte
              Interactive Media Developer
              Follow Me on Twitter | Visit my site | Learn MODX
              • 40988
              • 6 Posts
              Hi benmarte,

              thanks for your reply smiley

              Well the thing is that I am not exactly sure what I am supposed to do.

              What I WANT to do is: Set page specific priority for the XML created by the GoogleSiteMap addon. Now according to its changelog this should be possilbe. As far as I understood the changelog (https://github.com/splittingred/GoogleSiteMap/commit/4add84d3d028c0a3a3b1816d247d577e567c9cb) it should be possible by creating a TV called "priorityTV", let my template access it, open my document, go to the template varaible tab, select the TV called "priorityTV" and change the value there.

              Now thats exactly what I did but the XML created by the addon did not include my changed priority field so I must have done something wrong but I do not know what smiley

              Is the issue now maybe clearer?

              Thanks again for your help!

              P
              • discuss.answer
                • 40988
                • 6 Posts
                I finally found the solution! One has to add another parameter to the snipped call, then it works like a charm!

                [[!GoogleSiteMap? &excludeResources=`1,4` &priorityTV=`yourCreatedTV`]]