XF 2.0 Read HTML from plugin options

vijaichander

Active member
Hello,
I would like to know if I can modify a phrase value from my plugin options. I would like to create a new phrase and update it with the value a user enters which I can use in templates later.
 
Update: I tried to use the text entered in options directly in template but the text is entered as in in template instead of parsing as HTML
 
No clue if I understood you correctly, but what you want to do is probably create the phrase, set a placeholder in it, e.g. {placeholder}, and in your controller, where you call the phrase, pass that in, e.g. \XF::phrase('your_phrase_name', ["placeholder" => $the_user_value])
 
No clue if I understood you correctly, but what you want to do is probably create the phrase, set a placeholder in it, e.g. {placeholder}, and in your controller, where you call the phrase, pass that in, e.g. \XF::phrase('your_phrase_name', ["placeholder" => $the_user_value])
Well, I'm doing a template customization and have a option menu in ACP options where I enter html text and when displayed, it shows escaped html code in template.
So basically, I want to provide option in ACP to enter HTML code and show that in the template.
 
Back
Top Bottom