I am using the theme rainy_day, with a shop hack to mal's. I am having a problem adding a button in the main_menu1 (next to where it either says login or logout).
This is the code I tried:
In the file theme.php I added
Quote<!-- BEGIN view_cart -->
<td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
<td><img name="button1_r1_c1" src="themes/rainy_day/images/button1_r1_c1.gif" width="5" height="25" border="0" id="button1_r1_c1" alt="" /></td>
<td background="themes/rainy_day/images/button1_r1_c2.gif">
<a href="http://{$CONFIG['shop_server']}/cf/review.cfm?userid={$CONFIG['shop_userid']}">View Basket</A>
</td>
<td><img name="button1_r1_c3" src="themes/rainy_day/images/button1_r1_c3.gif" width="5" height="25" border="0" id="button1_r1_c3" alt="" /></td>
<!-- END view_cart -->
right before:
Quote<!-- BEGIN login -->
I also changed:
Quoteif (USER_ID) {
template_extract_block($template_main_menu, 'login');
} else {
template_extract_block($template_main_menu, 'logout');
template_extract_block($template_main_menu, 'my_profile');
}
to this:
Quoteif (USER_ID) {
template_extract_block($template_main_menu, 'view_cart');
template_extract_block($template_main_menu, 'login');
} else {
template_extract_block($template_main_menu, 'view_cart');
template_extract_block($template_main_menu, 'logout');
template_extract_block($template_main_menu, 'my_profile');
}
I thought that would work, but it doesn't show the button. I don't get any error either. Can anyone help me with this?
To see the site in action visit below and click on Photos
~fareforce
http://www.alaskastudio.com
template_extract_block removes the block from the template. (eg it removes the login link if you are logged in already) .You have it set to always remove the block therfore it never shows up. If you always want it to appear then you don't need to use the function or add your own comments around the code atall.