If you need more than one custom button you can do it like this
Code:
{elseif $style eq 'button1' && ($config.Adaptives.platform ne 'MacPPC' || $config.Adaptives.browser ne 'NN')}
<table cellspacing="0" cellpadding="0" onclick="{$js_link}" class="{$custom_class}"{if $title ne ''} title="{$title|escape}"{/if}>
{strip}
<tr>
<td>
<{$img_type} src="{$ImagesDir}/spacer.gif" class="{$custom_class}-l" alt="{$title|escape}" />
</td>
<td class="{$custom_class}"{$reading_direction_tag}>
<font class="{$custom_class}">{$button_title}</font>
</td>
<td>
<img src="{$ImagesDir}/spacer.gif" class="{$custom_class}-r" alt="{$title|escape}" />
</td>
</tr>
{/strip}
</table>
Now you should apply custom styles:
Code:
/*FirstButton*/
TABLE.FirstButton{
/*common first button styles*/
}
img.FirstButton-l{
/*left part of the first button styles*/
}
img.FirstButton-r{
/*right part of the first button styles*/
}
TD.FirstButton{
/*center part of the first button styles*/
}
/*SecondButton*/
TABLE.SecondButton{
/*common second button styles*/
}
img.SecondButton-l{
/*left part of the second button styles*/
}
img.SecondButton-r{
/*right part of the second button styles*/
}
TD.SecondButton{
/*center part of the second button styles*/
}
....
/*TheVeryLastButton*/
TABLE.TheVeryLastButton{
....
Now you can include button.tpl as
{include file='button.tpl'.... style='button1' custom_class="FirstButton"}
{include file='button.tpl'.... style='button1' custom_class="SecondButton"}
....
{...}
Quote:
is this the only .tpl that has to be changed when applying a new button?
|
If you include button.tpl directly this tpl is the only one.
Quote:
One more thing, where is the reference to the midd img?
|
in CSS TD.button1 should be like this
TD.button1{
background: #fff url(images/btn-c.gif) left top repeat-x;
}