bdotjones Posted June 10, 2005 Share Posted June 10, 2005 Hi, Considering the way that OsCommerce is setup is it a way to have different footer text appear on different pages?... Besides the obvious way of just putting your on html on the page without requiring the footer.php... I was thinking that you could have "if" statements in the footer.php that says something like "if" this page is true, then display this footer text...I'm new to php...but for instance, using the page titles that the breadcrumb assign... if (Catalog = true){ <?php echo FOOTER_TEXT_BODY ?> } if (Create an Account= true){ <?php echo FOOTER_TEXT_BODY_CREATE_ACCOUNT ?> } etc... I dont know...am I completly wrong with my way of thinking?...Let me know Thanx Link to comment Share on other sites More sharing options...
FalseDawn Posted June 10, 2005 Share Posted June 10, 2005 There's no reason at all why you can't do that. You might want to consider improving your php skills a bit first, and using the switch statement rather than a load of Ifs, and also look at the $_SERVER['PHP_SELF'] superglobal - it might be more reliable than relying on breadcrumb stuff. http://www.php.net/ is the best resource for all things PHP Link to comment Share on other sites More sharing options...
bdotjones Posted June 10, 2005 Author Share Posted June 10, 2005 So FalseDawn, Would I say if ($_SERVER['PHP_SELF'] == '/index.php') { <?php echo FOOTER_TEXT_BODY ?> } if ($_SERVER['PHP_SELF'] == '/create_account.php') { <?php echo FOOTER_TEXT_BODY_CREATE_ACCOUNT ?> } Link to comment Share on other sites More sharing options...
bdotjones Posted June 10, 2005 Author Share Posted June 10, 2005 Would I say if ($_SERVER['PHP_SELF'] == '/index.php') { <?php echo FOOTER_TEXT_BODY ?> } if ($_SERVER['PHP_SELF'] == '/create_account.php') { <?php echo FOOTER_TEXT_BODY_CREATE_ACCOUNT ?> } <{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
FalseDawn Posted June 10, 2005 Share Posted June 10, 2005 The only way to learn anything is to try things out, and if it doesn't work, try to figure out _why_ it doesn't work. What you have looks reasonable, but you won't know until you try it out. If you don't already have one, a local development environment is invaluable for "testing" if you are worried about messing things up on the host. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.