chipset Posted January 10, 2011 Share Posted January 10, 2011 Hi,I have a html/php page: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> </head><body> <?php $nameOfSlideshowToDisplay = "z"; $URLofyoursite = "..."; $AbsoluteServerPathofyoursite = "..."; include_once($AbsoluteServerPathofyoursite.".../z.php"); ?> </body></html> The "..." is working path.If I start it in IE, the page is working, but i do not how to insert the code in home.tpl or other .tpl. I try in header.php, but then it is visible on every page.Please help me to adding this banner. Link to comment Share on other sites More sharing options...
mayid Posted January 11, 2011 Share Posted January 11, 2011 You can use a module to add the code, and exclude it from some pages/templates. But if you just want this in your home pege, use this conditional in the .tpl file:{if $page_name == 'index'} {/if} Link to comment Share on other sites More sharing options...
chipset Posted January 12, 2011 Author Share Posted January 12, 2011 You can use a module to add the code..If i add the code in module, do not see anything. I try with:AddHeader v0.1.0Home text editor v1.5Block advertising v0.1HOME Free block v1.1I wont to try "{if $page_name == ‘index’} {/if}", but I do not know how. Maybe i should put the code between} {, or somewhere.. The result isFatal error: Smarty error: [in /...header.tpl line 15]: syntax error: unidentified token '�index�' (Smarty_Compiler.class.php, line 1410) in... Plese if not your problem, write me all of the code to put in .tplThanks. Link to comment Share on other sites More sharing options...
rocky Posted January 12, 2011 Share Posted January 12, 2011 It's because the forums converted the straight quotes into angle quotes. It should be: {if $page_name == 'index'} {/if} Link to comment Share on other sites More sharing options...
chipset Posted January 12, 2011 Author Share Posted January 12, 2011 Thaks rocky, no errors now, but anything to add, treat it as text. If i add some like "wjrhoqwrihilgr", i see it, but if i add <?php ..code..?> do not see anything. Link to comment Share on other sites More sharing options...
rocky Posted January 12, 2011 Share Posted January 12, 2011 You should use {php} {/php} instead. Link to comment Share on other sites More sharing options...
chipset Posted January 12, 2011 Author Share Posted January 12, 2011 No sorry, the banner is not displayed.I try many combinations, if the code is inside php tag, no errors, but and not displayed. If i purposely wrong.. just text displayed.Where i wrong? {if $page_name == 'index'}{php} $nameOfSlideshowToDisplay = "z"; $URLofyoursite = "..."; $AbsoluteServerPathofyoursite = "/..."; include_once($AbsoluteServerPathofyoursite."/..."); {/php}{/if} Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now