how to change background of sub page of left menu?

raja

Avatar: raja

2013-03-16 07:32

how to change background color of sub page menu of left menu in different color

» Quick.Cart v6.x

raj

interkob

Avatar: interkob

2013-03-21 14:17

for instance you have in style.css this one

#menu3 .sub1 li{padding:2px 0 2px 20px;background:url('img/menu3_sub.gif') no-repeat 7px 8px;border:0px;}

you can specify the background color in background attribute, for example red color

#menu3 .sub1 li{padding:2px 0 2px 20px;background:#f00 url('img/menu3_sub.gif') no-repeat 7px 8px;border:0px;}

raja

Avatar: raja

2013-03-22 07:15

thanks! it works propely but i mean i want to add individual background for different sub page.
can i add the following code instead of code u provide?


#menu3 .sub1 li#id15{padding:2px 0 2px 20px;background:#f00 url('img/menu3_sub.gif') no-repeat 7px 8px;border:0px;}

raj

interkob

Avatar: interkob

2013-03-22 08:46

yes, let it try.

in core/pages.php you have function throwMenu

$content .= '    <li class="l'.( ( !empty( $GLOBALS['config']['basket_page'] ) && $aData['iPage'] == $GLOBALS['config']['basket_page'] ) ? 'Basket' : ( ( $i == ( $iCount ) ) ? 'L'$i ) );


change with

$content .= '    <li id="id'.$aData['iPage'].'" class="l'.( ( !empty( $GLOBALS['config']['basket_page'] ) && $aData['iPage'] == $GLOBALS['config']['basket_page'] ) ? 'Basket' : ( ( $i == ( $iCount ) ) ? 'L'$i ) );



now you have ID with your pages

find the throwSubMenu function and also change

$content .= '    <li class="l'.( ( $i == ( $iCount ) ) ? 'L'$i );


with

$content .= '    <li id="id'.$aData['iPage'].'" class="l'.( ( $i == ( $iCount ) ) ? 'L'$i );



and now your subpages have their IDs too.

raja

Avatar: raja

2013-03-24 06:20

i ve get error in pages plz give me complete code please

raj

interkob

Avatar: interkob

2013-03-24 07:52

for me there are no errors.

the only thing you need to to is insert

id="id'.$aData['iPage'].'"

after <li ...

so the beginning of code is
<li id="id'.$aData['iPage'].'"

Back to top
about us | contact