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

    Falling in love with MODx all over again thanks to the great work on Revo!

    I’d like to reach out to the team to appeal for a change in how [[*alias]] is used.

    The only time I use that TV is in creating links, such as:

    <a href="[[*alias]]">[[*pagetitle]]</a>

    The problem is that doesn’t append the Content Type at the end. I’ve had to replace it with [[~[[*id]]]]

    If alias isn’t meant to be treated as the "friendly URL" for the Resource, what is its purpose?
      • 18373 ☆ A M B ☆
      • 3,141 Posts
      We talked on IRC for a short while already, but perhaps this can help.


      The [[*alias]] resource field only holds the actual alias, and doesn’t render a full link.

      A possible use for this (which of course would better be done using the ID, but still...) was using an image on a resource page.

      <img src="assets/images/pagespecific/icon_[[*alias]].png" alt="Bla" />



      Another use of the alias field I can imagine right now is when you have a resource which contains a snippet to look up, say, store information where a storename or id is passed through the link. Links you make to that store comes in a beautiful /store/1234-wicked-store.html format, which of course renders a 404... unless you’d put a plugin to that cause which sends it forward to a resource with the alias of "store" with 1234 as query parameter.


      All in all, just use [[~[[*id]]]]. tongue
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 21792
        • 37 Posts
        I find the [[*alias]] really useful for stying individual pages, eg supplying it as a class for banner divs - my web designers don’t understand "templates"