We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3689
    • 264 Posts
    I’m tring to show the actual web address since the page im using it for is suppose to be printed using site_name wont work.. heres the code
    <li><span><a href="[~[(site_start)]~]">[(site_name)]</a></span></li>

    The site_start goes where i want it to, but i would like "[(site_name)] to show the destination of site_start which would be the homepage.. just trying to get the http://site.com to show so i dont have to keep changing it when i start another site from this template
      • 9207 ☆ A M B ☆
      • 2,475 Posts
      Do you have this defined in your configuration tab? What’s showing now for the site’s name when you use [(site_name)]?
        • 3689
        • 264 Posts
        Quote from: Everett at Feb 03, 2010, 05:37 PM

        Do you have this defined in your configuration tab? What’s showing now for the site’s name when you use [(site_name)]?

        its showing "Real Estate Site" which is what it is, but i want to show the actual url

        ETA: i tried [(site_url)] which is what I want, but it has a trailing slash.. this page is only for printing so is there a way to remove the trailing slash?
          • 9207 ☆ A M B ☆
          • 2,475 Posts
          Most of the placeholders that use the [(notation)] come straight from your configuration tab inside the manager. I’m not sure of the particulars with the url, but another simple solution is for you to create a chunk with that information. E.g. create a category called "global" and make any Chunk you need in there to support your templates, e.g. {{ContactInfo}}, {{SiteUrl} etc.
            • 3689
            • 264 Posts
            Quote from: Everett at Feb 03, 2010, 06:06 PM

            Most of the placeholders that use the [(notation)] come straight from your configuration tab inside the manager. I’m not sure of the particulars with the url, but another simple solution is for you to create a chunk with that information. E.g. create a category called "global" and make any Chunk you need in there to support your templates, e.g. {{ContactInfo}}, {{SiteUrl} etc.

            Yea I’ll just have to go with the chunk.. was trying to make the changes to the template as least as possible when i start on another site.. thanks 4 the help !
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              You could use a snippet to get $modx->config[’site_url’] and strip the trailing slash, then return the stripped URL.
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org