change the submenu width

GK User
Thu Sep 22, 2011 11:32 am
Problem with submenu.

I need urgent help please. I saw a solution with version 1.5 does not work with version 1.7 I've been days trying to find the solution.

How to change the submenu width from 200 to 400 px.

Would it be possible that the column width matches the width of the text.

thank you very much
User avatar
Junior Boarder

GK User
Fri Oct 28, 2011 4:19 am
lluismac wrote:Problem with submenu.

I need urgent help please. I saw a solution with version 1.5 does not work with version 1.7 I've been days trying to find the solution.

How to change the submenu width from 200 to 400 px.

Would it be possible that the column width matches the width of the text.

thank you very much


Hey there, I had the same issue in 1.7, I modified templatesgk_musicitylibmenuGKMenu.php

Hope it works for you...
User avatar
Fresh Boarder

GK User
Fri Oct 28, 2011 6:49 am
Here is an edits for 400px
Backup your file first.
Find File: templatesgk_finance_businesslibmenuGKMenu.php
Find Line: 135 to 151
Replace with following:
Code: Select all
       function beginMenuItems1($pid = 0, $level = 0, $return = false) {
            $cols = $pid && $this->getParam('gkmenu') && isset($this->items[$pid]->cols) && $this->items[$pid]->cols ? $this->items[$pid]->cols : 1;
            $width = 0;
         if($cols == 1) {
         $width=402;
         }
         else {
            for ($col = 0; $col < $cols; $col++) $width += 401;
         }
         for ($col = 0; $col < $cols; $col++) $width1 += 400;
            $style = " style="width: {$width}px;"";
         $style1 = " style="width: {$width1}px;"";
            $type_class = $this->items[$pid]->gkparams->get('subcontent') == 'pos' ? 'module' : 'childcontent';
            if($type_class == 'module') $style = '';
            $data = "<div class="$type_class"$style>n<div class="$type_class-inner"$style1>n";
            if ($return) return $data; else echo $data;
        }
User avatar
Platinum Boarder

GK User
Mon Apr 23, 2012 4:15 pm
Hi,

I want to change the submenu width too. I have replace the line 135 to 151 like you say on your post but I have a blank page on the frontend.

Have you a solution.
User avatar
Expert Boarder

GK User
Mon Apr 23, 2012 4:26 pm
Sorry I have found the solution to fix the problem at https://www.gavick.com/forums/130/drop- ... 10654.html

Thanks
User avatar
Expert Boarder


cron