newteks Posted September 22, 2012 Share Posted September 22, 2012 Hello, I am very happy with WHMCS and I started to make my own template. in order to have clean code I use the command FETCH to bring different parts of code into the homepage.tpl for example <div id="starthere"> <div id="domain_search"> {fetch file='../support/templates/newteks/modules/domain_search.html'} </div> <div id="order_products"> {fetch file='../support/templates/newteks/modules/order_products.html'} </div> <div id="customer_login"> {fetch file='../support/templates/newteks/modules/admin_your_account.html'} </div> <div id="portfolio"> {fetch file='../support/templates/newteks/modules/portfolio.html'} </div> </div> <div id="slider_content"> {fetch file='../support/templates/newteks/modules/slider.html'} </div> Some of these HTML files that I fetch contain WHMCS variables like {$LANG.clientareahomeorder} When I view the template I don't see the text I suppose to see but I see {$LANG.clientareahomeorder} How I can see the value of the variable when the variable is in an HTML file that I fetch into the template ? thanks 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted September 23, 2012 Share Posted September 23, 2012 fetch will embed the text, it wont "parse" it and replace variables etc you want *include* and you want the files you include to be .tpl's 0 Quote Link to comment Share on other sites More sharing options...
newteks Posted September 23, 2012 Author Share Posted September 23, 2012 thanks for the reply. I change to include instead of fetch so I added for example this {include file='order_products.tpl'} and order_products.tpl is in the same directory with homepage.tpl and contains <img src="templates/newteks/img/title_new_order.png"/><br /><p style="color:#fff; text-align:justify; font-family:Verdana, Geneva, sans-serif; font-size:10pt;">{$LANG.clientareahomeorder}<br /></p> <form method="post" action="cart.php"> <p align="center"><input type="submit" value="{$LANG.clientareahomeorderbtn} »" class="btn" /></p> </form> and nothing shows up !!!! strange I don't know what I am doing wrong. can you please advice. 0 Quote Link to comment Share on other sites More sharing options...
jclarke Posted September 23, 2012 Share Posted September 23, 2012 Try using double quotes instead of single quotes, when I ran a quick test single quotes didn't work and it did work with double quotes. {include file="order_products.tpl"} 0 Quote Link to comment Share on other sites More sharing options...
newteks Posted September 23, 2012 Author Share Posted September 23, 2012 Unfortunately it is not working!!! 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted September 23, 2012 Share Posted September 23, 2012 If your in a normal template directory as it looks like you are then use {include file="$template/order_products.tpl"} 0 Quote Link to comment Share on other sites More sharing options...
newteks Posted September 23, 2012 Author Share Posted September 23, 2012 it works great now. thank you so much 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.