Please add variable insertion in post possible

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 ….

You would do this in the API using your own code typically.

1 Like

Yes, I am sure of that. But own code is for programmers.

I don’t know how difficult it can be to implement it or if it would make posts processing slower.

But being able make variable substitution in posts is useful for users and admins.

For example, we have several posts were we inform our users about image uploading limits.

If we change them later, we will have to look for that posts and change them to reflect new limits.
If we can use variable substitution that would be done automatically.

There are more places were it can be useful: for example I have uploaded some images as custom resources of some components, to be used in badges and groups.
They have been assigned variable names, but I cannot use them in the badge page to refer them as icon images, I have to use the complete url.
If we change the resource we will have to edit each badge and group config. If we can use variables, it would be done automatically.

Being able to define some custom variables would be interesting too (in order to use them in posts an config pages).

1 Like

Have a look at Discourse-placeholder-theme-component. It’s great for allowing users to add specific data to a post. We use it on some of our internal run books.

2 Likes

How this is done is most forums, is having a topic with the current rules (“Uploads Limits Topic”) and linking to it every time a user asks a question about uploads limit.

That way when the rules change, you can just update the canon topic. We do this here with the topics on #howto or #howto:faq

1 Like

Thank you rafael, it is just an example.
We have that post too, but we mention it here and there too.

It would be of help to be able to insert configuration variables any where you want to use them and being able to define some other variables.

I suppose yo can do that with a theme component.

I have been reading about that component, it is useful for creating forms for example, but not exactly what i was talking about here.