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

    I have modified a previous version of modx to safely display xml without adding .html like it normally would, I can’t for the life of me find the thread where I did it. Anyway, I tried the solutions provided here:

    http://modxcms.com/forums/index.php/topic,1997.0.html

    In editing the files, in modx 095 I find the following comment:

    // Modified for .xml extension 2006/1/18
    			//$filename = !empty($alias) ? $prefix.$alias.$suffix : $prefix.$id.$suffix ;
    			if(empty($alias)) {
    				$filename = $prefix.$id.$suffix;
    			} else {
    				$pa = pathinfo($alias); // get path info array
    				$tsuffix = !empty($pa[extension]) ? '':$suffix;
    				$filename = $prefix.$alias.$tsuffix;
    			}


    Does this mean its fixed, if so, how come I can’t get it working, any help would be much appreciated.

    Thanks.
      http://www.blend.uk.com | Web Design by Blend
      • 22303 MODX Staff
      • 10,725 Posts
      Honestly, for now, I would add the extensions to your aliases directly if you want .html on the end, rather than using suffix for this, then you avoid the whole problem. If I have my way, that will become a best practice and extensions being assigned by content type automatically can be setup as an option when working with friendly URLs.