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

    I am building the sitemap but for some reason it is keep add url after another url.

    Examples:

    https://www.followthecamino.com/blog/2014/07/03/spanish-vocabulary-camino-de-santiago/blog/2014/07/03/equipment-list-for-camino-de-santiago/

    It does not link to 404 page but it linked to actual page but cause duplicate content.

    How do i remove the "/" at the end of the url in the template or addon.

    Really appreciate for any help

    Thanks

    Magz
      • 28432
      • 372 Posts
      Did you mean Articles 1.7.11-pl ? This Extra is depreciated...

      But maybe we can help if you show the code who generate URL ;-)
        • 3749
        • 24,544 Posts
        Can you post the Tpl chunk(s) you're using to build the sitemap?
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 52128
          • 29 Posts
          Hi both, the problem is I can't find the code that generate the URL as I am learning everyday with Modx.

          This is the ArticlesStringSplitter code

          $string = $modx->getOption('string',$scriptProperties,'');
          $delimiter = $modx->getOption('delimiter',$scriptProperties,',');
          $tpl = $modx->getOption('tpl',$scriptProperties,'articlerssitem');
          $outputSeparator = $modx->getOption('outputSeparator',$scriptProperties,"\n");
          $outputSeparator = str_replace('\\n',"\n",$outputSeparator);
          $toPlaceholder = $modx->getOption('toPlaceholder',$scriptProperties,'');
          
          $items = explode($delimiter,$string);
          $items = array_unique($items);
          $list = array();
          foreach ($items as $item) {
              $list[] = $modx->getChunk($tpl,array(
                  'item' => $item,
              ));
          }
          
          $output = implode($outputSeparator,$list);
          if (!empty($toPlaceholder)) {
              $modx->setPlaceholder($toPlaceholder,$output);
              return '';
          }
          return $output;


          This is the snippet of "Displays Articles for a Container anywhere on your MODX site."

          $modx->lexicon->load('articles:frontend');
          
          $container = $modx->getOption('container',$scriptProperties,0);
          if (empty($container)) return '';
          /** @var ArticlesContainer $container */
          $container = $modx->getObject('ArticlesContainer',$container);
          if (empty($container)) return '';
          
          $placeholderPrefix = $modx->getOption('placeholderPrefix',$scriptProperties,'');
          
          $container->getPostListingCall($placeholderPrefix);
          $container->getArchivistCall($placeholderPrefix);
          $container->getTagListerCall($placeholderPrefix);
          $container->getLatestPostsCall($placeholderPrefix);
          $settings = $container->getContainerSettings();
          if ($modx->getOption('commentsEnabled',$settings,true)) {
              $container->getLatestCommentsCall($placeholderPrefix);
              $modx->setPlaceholder($placeholderPrefix.'comments_enabled',1);
          } else {
              $modx->s


          Does any of this code is what you looking for?

          Thanks

          magz
            • 3749
            • 24,544 Posts
            Can you post the content of the articlerssitem chunk in the Chunks section of the Elements tree in the MODX Manager?

            Also, check the spelling of that chunk name against the &tpl property in the snippet tag.
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 54075
              • 1 Posts
              Quote from: magzzs at Jul 20, 2016, 12:48 AM
              Hi,

              I am building the sitemap but for some reason it is keep add url after another url.

              Examples:

              https://www.followthecamino.com/blog/2014/07/03/spanish-vocabulary-camino-de-santiago/blog/2014/07/03/equipment-list-for-camino-de-santiago

              It does not link to 404 page but it linked to actual page but cause duplicate content.

              How do i remove the "/" at the end of the url in the template or addon.

              Really appreciate for any help

              Thanks

              Magz



              I keep having the same issue with my Camino de Santiago website and still haven't been able to solve it :/