vashichino7 Posted September 27, 2013 Posted September 27, 2013 Hey guys, how do I fix this code so that my h ref works correctly? This is in my menu.php... <li class="menu_item <?php if ($tab_sel == tep_href_link(ELECTRONICS)) echo "selected"?>" onclick="document.location='<?php echo '<a href=http://www.savingshub.com/electronics-c-51.html>';?><?php echo tep_draw_menu_top()?><a><?php echo Electronics;?></a><?php echo tep_draw_menu_bottom()?></li> any clue how to fix the h ref? Thank you for all your help.... Best, V
♥mommaroodles Posted September 27, 2013 Posted September 27, 2013 try this <li class="menu_item <?php if ($tab_sel == tep_href_link(FILENAME_ELECTRONICS, '' ,'SSL')) echo "selected"?>" onclick="document.location='<?php echo '<a href="' . tep_href_link(FILENAME_ELECTRONICS, '', 'SSL') .'"><?php echo tep_draw_menu_top() ?><?php echo TEXT_ELECTRONICS; ?></a><?php echo tep_draw_menu_bottom()?></li> you must have the file name defined in includes/filenames.php and the TEXT ELECTRONICS in the corresponding english file "The doorstep to the temple of wisdom is a knowledge of our own ignorance."
♥joli1811 Posted September 27, 2013 Posted September 27, 2013 real life template monster???? To improve is to change; to be perfect is to change often.
♥kymation Posted September 27, 2013 Posted September 27, 2013 The target of document.location is just a URL, not a full HTML link. So it would be <li class="menu_item <?php if ($tab_sel == tep_href_link(FILENAME_ELECTRONICS, '' ,'SSL')) echo "selected"?>" onclick="document.location='<?php echo tep_href_link(FILENAME_ELECTRONICS, '', 'SSL'); ?>'"> <?php echo tep_draw_menu_top() ?><?php echo TEXT_ELECTRONICS; ?><?php echo tep_draw_menu_bottom()?></li> See my profile for a list of my addons and ways to get support.
vashichino7 Posted September 27, 2013 Author Posted September 27, 2013 @@kymation@@joli1811@@mommaroodles thanks guys... I know i can make it with the electronics page... but that page is quite different for me, I would rather have the link be the h ref, any way to have the link be the href? Best, V
Recommended Posts
Archived
This topic is now archived and is closed to further replies.