![]() |
Problem with inserting a variable into a template
hello i have this code and works great but i have to add "{vb:raw login_panel}" to the header template
PHP Code:
PHP Code:
someone that could help me? Or has another way to do it? |
I think the problem is that the template cache contains php code, and you're tacking on html and css, which doesn't run as php code of course. Try this:
PHP Code:
|
It works great but now i'm trying to add it to the begin of the template
I tred this but doesn't work PHP Code:
|
You can look at the compiled template in the database: the problem is that it starts like this:
Code:
$final_rendered = '<div class="above_body"> So that wipes out anything you add to the $final_rendered variable before that. So try this instead: Code:
$replace = '$final_rendered = \'' . addcslashes($login_panel.$login_panel_css.$login_panel_javascript, "'\\") . '\' . '; |
works great thanks :)
|
All times are GMT. The time now is 09:20 AM. |
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:
|