|
|
#1 |
|
Junior Member
Join Date: Jun 2007
Posts: 11
Rep Power: 8 ![]() |
I cannot get my smarty templete to see my smarty function. I placed the new function in the functions_checkout.php file. I placed the function in the step3.tpl.php template. When executed, nothing happens. As part of the debuging process, I removed most of the code so that it is now only a function and return as follows:
function smarty_function_gsdates($section) { $test=="This worked"; return $test; } The call in the template is: {$smarty_function_gsdates} Once I get the tempate to see the function, I will add in additional coding.
__________________
Neal McGuire Yard sales in Cape Girardeau Missouri Southeast Missouri Real Estate |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Mar 2006
Posts: 4,176
Rep Power: 102 ![]() ![]() |
Your intermixing php functions and smarty functions but it doesnt work like that.
Smarty functions can of course contain php but by default when you call a smarty function it looks in a predefined place for the function and is the same as running PHP code within a template. Try taking your function code above and put it in a file called.... function.gsdates.php and place it in /includes/classes/smarty/plugins/ then if you call the smarty function in the template, it should look in that folder and execute the proper function.
__________________
Larry. (Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free) Set your site apart from the competition with one of my modules...... Google Map Module | You Tube Module | Google Calendar Module | Event Calendar Module 68 Classifieds Important Links Customer Area | Issue Tracker | Knowledge Base | User Manuals |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jun 2007
Posts: 11
Rep Power: 8 ![]() |
Thanks,
That lead me in the right direction. After a little bit of experimentation, I got it to work.
__________________
Neal McGuire Yard sales in Cape Girardeau Missouri Southeast Missouri Real Estate |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Smarty Templates and You. Posted BY Lhotch | Eric Barnes | HTML, CSS, and Design Help | 13 | 10-02-2007 08:06 AM |
| Where is the custom field search function? | MrSpandex | v3.1 Modules & Modifications | 3 | 12-08-2006 06:33 PM |
| Custom Payment Mod | pruffin | v3.1 Questions & Support | 0 | 12-06-2006 12:34 AM |
| Custom Payment Provider? | flyingpylon | v3.1 Questions & Support | 4 | 10-31-2006 03:49 PM |