This has been asked a few times. From my understanding, the short answer is no, except maybe with some javascript, and there is a feature request which you should “like” if it would help you.
I would like to insert a system variable in a post (for example site_name).
If our site_name is OJODIGITAL, I had expected that when I insert in a post this text site_name would have been substituted for OJODIGITAL, but it is not.
Hello friend, in our site %{site_name} you can see ….
I have seen this kind of constructions in text customization messages (site adjustments/Customize/Text).
Is it possible to do that? How?
This is not possible at the current time.
Here is my (somewhat clumsy) solution, in case it helps someone. I added this code under Admin > Customize > Themes > Edit CSS/HTML > /head:
<script type="text/discourse-plugin" version="0.8">
api.decorateCooked($elem => {
var i, j;
var selector = 'https://example.typeform.com';
// seems like this should work but it doesn't:
// var typeforms = $elem[0].querySelectorAll('src^=[' + selector + ']');
var ps = $elem[0].querySele…
It would be great to be able to insert a system variable in a post (for example site_name).
If our site_name is OJODIGITAL, I had expected that when I insert in a post this text site_name would have been substituted for OJODIGITAL, in a similar way that can be done in text customization (site adjustments/customize/text)
Hello friend, in our site %{site_name} you can see ….
1 Like