Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
6 - 5 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     

Re: PHP variables in templates?
by kalamata on 2007/1/12 14:28:55

Works like a charm - many thanks!!!

George
Re: PHP variables in templates?
by frankblack on 2007/1/12 13:57:15

le="color: #000000"><?php <{php}>...here goes your php code...<{/php}>


allows PHP inside templates

http://smarty.php.net/manual/en/language.function.php.php
http://smarty.php.net/manual/en/tips.componentized.templates.php

These are nice tutorials, but be aware that the syntax is different (< before { and > after }).
PHP variables in templates?
by kalamata on 2007/1/12 13:21:37

Dear All,

Would it be possible to use PHP variables in block templates? The problem I am having is as follows: I want to give my users the option of switching between themes - however the template as it stands at the moment changes the template but takes you back to the index page. So, if the user was looking at the guestbook module he has to navigate back to it after changing the theme.

To solve that, I tried to replace index.php with <?php echo $PHP_SELF ?>, but the template simply refused to work. The action file does not have to be index.php as any file you replace it with (e.g. http://www.mysite.com/modules/xfguestbook) will work as well - my understanding is that theme selection happens in header.php and all files import it in one or another way.

How can I resolve this?

I look forward to hearing from you soon.

Thanks in advance.

George

Who's Online

234 user(s) are online (177 user(s) are browsing Support Forums)


Members: 0


Guests: 234


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits