TAMAN Posted September 2, 2016 Posted September 2, 2016 Is there anyway to make text field to accept templates and logics ? for example i have a text field in my theme setting in this field im using a Pages block key inside a <li> tag the out put is only {block="articles"} it works fine if i use the block keys in html templates but not if it comes form a text field Help appreciated
bfarber Posted October 3, 2016 Posted October 3, 2016 Text input fields do not process HTML logic. You would need to run the content through the theme system to do that (which means you'll need to write some sort of processing layer when the theme setting is saved or when it is used on the front end). If you still want to go this route, which I don't really recommend (you're creating a lot of work for yourself IMO), look at how the email class handles email subjects - this is essentially creating and processing content through the template system at run time without actually using the template system itself to store the content.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.