Elxis CMS Forum

Support => General => Topic started by: Bezman on June 20, 2015, 16:53:33

Title: Placeholders in articles?
Post by: Bezman on June 20, 2015, 16:53:33
Hi, I was reading "All about articles" and also searched the forum.
I wanted to write the text "Welcome, <username>" on the welcome page of my site, but I could not find info about how to format that to make it dynamically display the username of the currently logged in user. Or even if such placeholders are available in Elxis.
I checked out "Parameters" too, but it appears to only apply to XML files. What I need is a placeholder inside an article, so I don't have to edit the code of the web pages.
Can it be done?
Title: Re: Placeholders in articles?
Post by: datahell on June 22, 2015, 23:19:51
This is why plugins are for!
You need a special plugin to do so and off course the user must be logged in to know his name. Can you provide more details on how you want this to work?
Title: Re: Placeholders in articles?
Post by: Bezman on July 01, 2015, 10:26:16
This is why plugins are for!
You need a special plugin to do so and off course the user must be logged in to know his name. Can you provide more details on how you want this to work?
Ah, of course. Didn't think of that. I will see if I can build one myself.

For the record - no need to reply:
What I initially thought was if there were some kind of "reserved words" or variables in Elxis base, such as $PATH etc in Unix ksh scripts. In any Elxis article (or autonomous page), all occurences of these would be automatically instantiated with ($my->username) or whatever variable the reserved word is defined as/connected to.

I think the plugin option sounds like an easy alternative - I will look into it...
If you have any suggestions of other system parameters I could include at the same time, you can post it here.