X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   {include file=...} with extra class (https://forum.x-cart.com/showthread.php?t=55398)

Sisom 09-04-2010 05:42 AM

{include file=...} with extra class
 
Hi, I am trying to move the 'Send to friend' button down a little, in customer/main/send_to_friend.tpl.

I know that line 55 creates the button:


Code:


        {include file="customer/buttons/button.tpl" type="input" button_title=$lng.lbl_send_to_friend}


I was wondering if there was a way to 'insert' a class here, such as

Code:


        {include file="customer/buttons/button.tpl" type="input" button_title=$lng.lbl_send_to_friend class="send_to_friend"}


(Obviously that doesn't work or I wouldn't be asking!)

I know I could make a 'button2.tpl' and copy button.tpl, then change the CSS for that, but I thought it might be better to just add in a class - if it's possible. Does anybody know how this is done?

Many thanks in advance.

robb3369 09-04-2010 06:14 AM

Re: {include file=...} with extra class
 
Why can't you simply wrap the include in a div and add a top-margin?

Code:

<div style="margin-top:10px;">{include file="customer/buttons/button.tpl" type="input" button_title=$lng.lbl_send_to_friend}</div>

cflsystems 09-04-2010 11:36 AM

Re: {include file=...} with extra class
 
All you have to do is look in "customer/buttons/button.tpl" to know how to do it. Add "additional_button_class" like this

{include file="customer/buttons/button.tpl" type="input" button_title=$lng.lbl_send_to_friend additional_button_class="send_to_friend"}



All times are GMT -8. The time now is 11:34 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.