| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Calling an HTML Scroll Bar, NEED php help | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() This is INSIDE my MAIN home.php
<IFRAME width="460" height="395" frameborder="yes" scrolling="auto" name="iframe" SRC="insert.php"></IFRAME> now insert php has the call : {include file="customer/home_main.tpl"} this ISNT displaying, all I get is just the text inside the scrollbox... HOW can I make a call to the template from this text/html box??? Ive been messing with this for far too long thanks! |
|||||||
#2
|
|||||||||
|
|||||||||
![]() Can you post the code for insert.php and / or a link to the site in question?
__________________
X-cart Featured Products Manager from http://www.firetanksoftware.com - Put your products where you want, how you want. |
|||||||||
#3
|
|||||||
|
|||||||
![]() hey thanks
![]() well the insert.php really has nothing, {include file="customer/home_main.tpl"} is the main part of it... the site is www.hempgirlz.com/xcart/customer/home.php thing is im not sure what shape that page will be in Im making all kinds of changes etc it *should* be there though and the reason I need the scroll bar is obvious when you get there I need all the items and functions to fit in my graphically driven site ty!!! |
|||||||
#4
|
|||||||||
|
|||||||||
![]() Well, "insert.php" is a php script, not a smarty template. You're trying to use smarty syntax outside of a smarty script.
Read up on the forums about smarty and you should be able to figure it out. If not, you can always post questions. It's actually somewhat complex to get a new page with smarty to work like you're wanting it to. I, personally, would suggest finding a better solution, or posting in the smarty area of the forum exactly what look / functionality you're going for and seeing if anyone else has some examples. I hope this helps!
__________________
X-cart Featured Products Manager from http://www.firetanksoftware.com - Put your products where you want, how you want. |
|||||||||
#5
|
|||||||
|
|||||||
![]() kk
thanks and before i go too far into the depths of smarty stuff (really gotta get this site up ![]() does this hold any water? am i on the right path at all with this post? __________________________________________________ ______ AJ Member Joined: 17 Oct 2002 Posts: 25 Location: Marietta, Ohio Posted: Fri Nov 22, 2002 11:35 am Post subject: -------------------------------------------------------------------------------- Since I haven't seen anyone post a solution on this, I'll post a couple methods I'm using. To include a php file in a Smarty .tpl file, just do this: {include_php file="/pathtofile/file.php"} This seems to work pretty well, assuming you don't need to use any variables from Smarty. You can also use actual PHP code too! Just do it like this: {php} php code goes here; {/php} For this to work, you have to set the $php_handling variable to SMARTY_PHP_ALLOW in /Smarty-2.1.1/Smarty.class.php. Hope that helps someone out there. Took me forever to figure it out. Now, if someone can tell me how to pass a Smarty-defined variable to an included PHP script, I'd love to hear it! |
|||||||
#6
|
|||||||
|
|||||||
![]() all im really trying to do is pull
customer/home_main.tpl into a scrollable document within my actual page how is this best accomplished? thanks ![]() |
|||||||
#7
|
|||||||
|
|||||||
![]() You're on the right track but you were trying to cut out too many steps.
Your IFRAME is calling "insert.php". So what you need to do is take most of the code from /customer/home.php and paste it into "insert.php". Then include a different smarty template instead of "customer/home.tpl". Based on x-cart version 3.4.4, insert.php would look like this: Code:
Note that the last line is all I changed. Then you need to setup a special template for this purpose. I've named it "just_the_middle.tpl" and put it in the "customer" directory. I took the code from "customer/home.tpl" and cut out all the stuff you don't want. Here's the code of "just_the_middle.tpl" (once again, this is based on version 3.4.4). Code:
I haven't tested it, but that ought to do it. Good luck. |
|||||||
#8
|
|||||||
|
|||||||
![]() hey thanks a lot was gettin discouraged bigtime
I appreciate your time and now im gonna go try this! ![]() _____________________ Worked like a charm took me 30 seconds to make this work after spending about 8 hours on it! thanks again |
|||||||
#9
|
|||||||
|
|||||||
![]() i guess now some crafty href calls as all my links are reopening in that small IFRAME window
hmm new cans of worms at every corner... I like learning, and I sure didnt know jack about this last week ... ![]() |
|||||||
#10
|
|||||||
|
|||||||
![]() If you're going to do your whole site inside an IFRAME it may be easier just to have your IFRAME call /customer/home.php and then save the "just_the_middle.tpl" as "/customer/home.tpl".
|
|||||||
|
|||
X-Cart forums © 2001-2020
|