We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2762
    • 1,198 Posts
    Hello:)
    Is possible to use ’’Automatically generate alias’’ to generate for alias in NewsPublisher?

    to obtain something like
    title.html

    not
    article-1126282979.html
      Free MODx Graphic resources and Templates www.tattoocms.it
      -----------------------------------------------------

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

      bubuna.com - Web & Multimedia Design
      • 18397
      • 3,250 Posts
      This would work for one word title’s (code untested).
      Maybe Raymond could explain how to make it work with _’s

      $aliastitle = mysql_escape_string($modx->stripTags($_POST['pagetitle']));
      $alias = 'article-'.$aliastitle;
      
        • 2762
        • 1,198 Posts
        works fine! grin thanks again Mark wink
          Free MODx Graphic resources and Templates www.tattoocms.it
          -----------------------------------------------------

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

          bubuna.com - Web & Multimedia Design
          • 18397
          • 3,250 Posts
          Your welcome.

          Just remember

          This would work for one word title’s (code untested).
          Maybe Raymond could explain how to make it work with _’s
            • 32963
            • 1,732 Posts
            Hi Mark,

            Thanks for the update. I’ve added your changes to the NewsPublisher snippet.

            Use &aliastitle=1 to activate alias title.

            Edited: Should now work. Useage:

            [[NewsPublisher? &aliastitle=1 &clearcache=1]]

            The new &clearcache=1 param will automatically clear the cache after posting.

            PS. Make sure you update the cache_sync.class.processor file with the one inside the attached zip file.
              xWisdom
              www.xwisdomhtml.com
              The fear of the Lord is the beginning of wisdom:
              MODx Co-Founder - Create and do more with less.
              • 18397
              • 3,250 Posts
              @Raymond

              Doesn’t seem to work.
                • 32963
                • 1,732 Posts
                See Reply #4
                  xWisdom
                  www.xwisdomhtml.com
                  The fear of the Lord is the beginning of wisdom:
                  MODx Co-Founder - Create and do more with less.