![]() |
Fetch Template in Plugin
Is it possible to fetch a template in a plugin and then output the template?
I'm trying to do it and it doesn't seem to work for me..... |
Code:
eval('$YourTemplate = "' . fetch_template('YourTemplate') . '";'); How did you define the template? What hook to use? |
OK, that does seem to almost work. I'm sure I'd tried it numerous times and it didn't work. I'm using the global_start hook as I'm trying to add the template copy to custom header. This is my template I'm fetching....
HTML Code:
<if condition="$show['notifications']"> --------------- Added [DATE]1234238099[/DATE] at [TIME]1234238099[/TIME] --------------- OK, used parse_templates hook instead and it's all good. Cheers! |
As you've found out, the phrase variable does not exist at global_start yet.
|
All times are GMT. The time now is 08:14 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|