We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19220
    • 26 Posts
    I followed the instructions from the wiki, but I’m still having trouble. I’ve turned on friendly alias paths. If I have a category called website, it seems to me that I want the url to be mysite.net/categories/website. tagLinks is producing the url mysite.net/categories?tags=website.

    I looked into the php code and changed

    /**
    * Set the URL path if Friendly alias paths were declared.
    */
    if ($fap == '1'){
    	$doc_path = $modx->config['site_url'].$path.'&tags=';
    } else {
    	$doc_path='&tags=';
    }
    


    to

    /**
    * Set the URL path if Friendly alias paths were declared.
    */
    if ($fap == '1'){
    	$doc_path = $modx->config['site_url'].$path.'/';
    } else {
    	$doc_path='&tags=';
    }
    


    and the links now work ... but it seems like I’m probably doing something wrong. Help?
      • 21800
      • 174 Posts
      Hello,
      I use this fabulous ditto 2.0.3 for event organisation, also kalender_enhanced for comfortable access to the event description.
      The problem is that kalender links point to the single event page.
      Thus the fantastic line with the tags that came with the ditto call (which tags point to a landing page with other events with that tag) is lost.
      I thought taglinks could help me out here. But I managed to succeed only up to the point the tags are displayed correctly (separated) but I miss a way to point to the landing page (see ditto, there are no category pages for tags - http://ditto.modxcms.com/screencast/tagging.html - ). The links provided by taglinks are of this kind in my installation: "…/&tags=mytag".

      is there any good idea?

      edit:
      An adaquate solution seems to be "TvTagCloud" (in a version of our french friends "2.1.1b" for utf-8, thanx for sharing) it supports the landing page of ditto - great, respect.
        • 27330
        • 884 Posts
        After doing Astronut’s changes I can see the categories/tags finally instead of "Array". However when I click any tag from the <ul> it redirect me to my home page with a URL like this:
        http://domain.com/&tags=modx


        any ideas what could i messed up?
          • 21056
          • 327 Posts
          Quote from: sinbad at Mar 04, 2008, 10:15 PM

          After doing Astronut’s changes I can see the categories/tags finally instead of "Array". However when I click any tag from the <ul> it redirect me to my home page with a URL like this:
          http://domain.com/&tags=modx


          any ideas what could i messed up?

          Have you specified a &path parameter? This tells the snippet where to link to.
            Author: ManagerManager plugin - customise your ModX manager interface

            Rckt - web development, Sheffield, UK
            • 27330
            • 884 Posts
            Muchos gracias ncrossland,
            I dont use FAP so I thought the &path is not necessary, but it is smiley

            thanks!
              • 727
              • 502 Posts
              Quote from: mglerner at Jan 01, 2008, 08:38 PM

              I followed the instructions from the wiki, but I’m still having trouble. I’ve turned on friendly alias paths. If I have a category called website, it seems to me that I want the url to be mysite.net/categories/website. tagLinks is producing the url mysite.net/categories?tags=website.

              I looked into the php code and changed

              /**
              * Set the URL path if Friendly alias paths were declared.
              */
              if ($fap == '1'){
              	$doc_path = $modx->config['site_url'].$path.'&tags=';
              } else {
              	$doc_path='&tags=';
              }
              


              to

              /**
              * Set the URL path if Friendly alias paths were declared.
              */
              if ($fap == '1'){
              	$doc_path = $modx->config['site_url'].$path.'/';
              } else {
              	$doc_path='&tags=';
              }
              


              and the links now work ... but it seems like I’m probably doing something wrong. Help?

              I am wondering the same thing. Nobody else mentioned it, so myself and mglerner must be doing something wrong. Any ideas?

              Andy
                • 2912
                • 315 Posts
                I think I may have found a bug when using the &path as a number.

                My returned URL has // preceding the path page.

                I made the following change to remove the offending slash:

                	$path = $modx->makeUrl($path);	
                

                To
                	$path = "[~".$path."~]";
                


                Also could you replace:
                if ($fap == '1'){
                

                To
                if ($modx->config['friendly_urls'] == 1){
                

                To do away with the need for the $fap?

                Sorry if I’m being a PITA. I stumbled on this snippet and didn’t realise how much I needed it.

                Thanks Scotty.
                  BBloke
                  • 21056
                  • 327 Posts
                  Quote from: BBloke at Apr 13, 2008, 07:03 AM

                  I think I may have found a bug when using the &path as a number.

                  I noticed this too. I’ve amended the script, and uploaded to the repository - it fixes the two bugs you mention (albeit in a different way) and makes sure it respects ModX config settings for XHTML URLs.
                    Author: ManagerManager plugin - customise your ModX manager interface

                    Rckt - web development, Sheffield, UK
                    • 2912
                    • 315 Posts
                    Thanks ncrossland. Time for me to update mine to match.

                    I’m not very modxified myself. smiley
                      BBloke
                      • 27330
                      • 884 Posts
                      did anyone made it to work with generating &element=`option` ?