bernhara Posted April 24 Share Posted April 24 I would like to include some pointers into different text blocks (WYSIWYG or HTML). Currently, to prevent havinng the absolute URL path hard coded in the HTML text, I would like to use a variable which holds the URL prefix (ie. service name and port). I browsed mostly the whole documentation, but I did not find a place where variables are listed and how to do that. Link to comment Share on other sites More sharing options...
Marc Stridgen Posted April 24 Share Posted April 24 I have moved this to our developer connection forum, that is better placed for your topic 🙂 Link to comment Share on other sites More sharing options...
BN_IT_Support Posted April 24 Share Posted April 24 1 hour ago, bernhara said: I would like to include some pointers into different text blocks (WYSIWYG or HTML). Currently, to prevent havinng the absolute URL path hard coded in the HTML text, I would like to use a variable which holds the URL prefix (ie. service name and port). I browsed mostly the whole documentation, but I did not find a place where variables are listed and how to do that. Hi, I'm largely guessing what you mean - thus possibly guessing incorrectly. It would make it clearer if you provided more detailed examples of what you want. My guess: In PHP something like this might work: $url = \IPS\Http\Url::external("https://{$service}:{$port}/rest-of-url"); or in a template file (PHTML): {{$url = \IPS\Http\Url::external("https://{$service}:{$port}/rest-of-url");}} Then you can use the $url variable in your text/html - either in a template file or else text embedded in your PHP: <a href="{$url}">Click this</a> John Link to comment Share on other sites More sharing options...
Recommended Posts