We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34066 ☆ A M B ☆
    • 23 Posts
    I am trying to register a custom URL basepath. The sole purpose of this is to be able to enter the name of an image without having to type the full path everytime, for example:

    I want this:
    <img src="assets/content/blog/images/myimage.jpg">


    To turn into something like this:
    <img src="[[!customBasepath]]myimage.jpg">


    I realize I could create a chunk with this in it: "assets/content/blog/images/" and use it like this:

    <img src="[[$customBasepath]]myimage.jpg">


    But almost certain this is not the best way to go about accomplishing this..

    Any insight is always appreciated. Thank in advance..

      Tony Porto | Valpo Creative | http://www.valpocreative.com
      • 4172
      • 5,888 Posts
      I think you are missing the

      <base href="[[++site_url]]" />

      in your template's HTML head [ed. note: Bruno17 last edited this post 12 years, 11 months ago.]
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 4172
        • 5,888 Posts
        sorry, now I see what you are talking about.

        can't you use mediasources and use a image-TV with a mediasource and put the image by putting the TV to your template?

        <img src="[[*yourImageTV]]"> 
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!