search in position "user3"

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Tue Nov 13, 2012 4:24 pm
Reply with quote
Report this post
How can i have search module in 'user3' position.

For the moment i have the 'main menu' i want to have search module inline after the menu.


Can i only put one item in this position?

gkpagewrap is 1280px long
gkmainmenu is 699px long
so there is 500px to put the search module...
User avatar
Junior Boarder

GK User
Tue Nov 13, 2012 6:12 pm
Reply with quote
Report this post
Hi

Try this:

1) Open templateDetails.xml file and find:

Code: Select all
<position>login</position>


replace with

Code: Select all
<position>login</position>
<position>search</position>


2) Open ../lib/framework/gk.const.php and find:

Code: Select all
'login' => 'none',


replace with

Code: Select all
'login' => 'none',
'search' => 'none',


3) Go to template parameters > advanced settings and enable the use of css override.

4) Open ../css/override.css file and add this line:

Code: Select all
#gkSearch {float: right; margin: 20px 34px 0 20px; }


5) Open ../layouts/default.php and replace this:

Code: Select all
                        <?php if($this->API->modules('inset')) : ?>
             <div id="gkTabletMenu">Tablet menu</div>
             <?php endif; ?>
       </div>


with

Code: Select all
                       <?php if($this->API->modules('inset')) : ?>
             <div id="gkTabletMenu">Tablet menu</div>
             <?php endif; ?>
       </div>
         
         <?php if($this->API->modules('search')) : ?>
         <section id="gkSearch">
         <jdoc:include type="modules" name="search" style="<?php echo $this->module_styles['search']; ?>" />
         </section>
         <?php endif; ?>


6) Finally go to modules manager and publish search module on "search" position.


It should look like this:

screen.jpg


Cheers ;)
User avatar
Platinum Boarder

GK User
Tue Nov 13, 2012 9:22 pm
Reply with quote
Report this post
you're really the best... What else? :D
User avatar
Junior Boarder

GK User
Tue Nov 13, 2012 10:42 pm
Reply with quote
Report this post
I must have miss something?

default.php
Code: Select all
<section id="gkPageTop">                       
          <?php $this->layout->loadBlock('logo'); ?>
         
          <div id="gkMainMenu"<?php if($this->API->modules('search')) : ?> class="hasSearch"<?php endif; ?>>
             <?php
                $this->mainmenu->loadMenu($this->API->get('menu_name','mainmenu'));
                 $this->mainmenu->genMenu($this->API->get('startlevel', 0), $this->API->get('endlevel',-1));
             ?>   
             
             <div id="gkMobileMenu">
             <?php echo JText::_('TPL_GK_LANG_MOBILE_MENU'); ?>
             <select onChange="window.location.href=this.value;">
             <?php
                 $this->mobilemenu->loadMenu($this->API->get('menu_name','mainmenu'));
                 $this->mobilemenu->genMenu($this->API->get('startlevel', 0), $this->API->get('endlevel',-1));
             ?>
             </select>
             </div>
             
             <?php if($this->API->modules('inset')) : ?>
             <div id="gkTabletMenu">Tablet menu</div>
             <?php endif; ?>
            
          </div>
         <?php if($this->API->modules('search')) : ?>
         <section id="gkSearch">
         <jdoc:include type="modules" name="search" style="<?php echo $this->module_styles['search']; ?>" />
         </section>
         <?php endif; ?>
       </section>


templateDetails.xml
Code: Select all
<positions>
<!--  Template specific Module Positions  -->
<position>breadcrumb</position>
<position>usermenu</position>
<position>header</position>
<position>social</position>
<position>login</position>
<position>search</position>
<!--  STANDARD Module Positions  -->
<position>sidebar</position>
<position>inset</position>
<position>mainbody</position>
<position>mainbody_top</position>
<position>mainbody_bottom</position>
<!--  TOP Module Positions  -->
<position>top</position>
<!--  BOTTOM Module Positions  -->
<position>bottom</position>
<!--  MENU Module Positions  -->
<position>menu1</position>
<position>menu2</position>
<position>menu3</position>
<position>menu4</position>
<position>menu5</position>
<position>menu6</position>
<position>menu7</position>
<position>menu8</position>
<position>menu9</position>
<position>menu10</position>
<!--  TAB Module Positions  -->
<position>tab1</position>
<position>tab2</position>
<position>tab3</position>
<position>tab4</position>
<position>tab5</position>
<position>tab6</position>
<position>tab7</position>
<position>tab8</position>
<position>tab9</position>
<position>tab10</position>
</positions>


gk.const.php
Code: Select all
// definitions of module positions default styles
$GK_TEMPLATE_MODULE_STYLES = array(
   'header' => 'none',
   'breadcrumb' => 'none',
   'usermenu' => 'none',
   'social' => 'none',
   'login' => 'none',
   'search'=> 'none',
   
   'mainbody' => 'gk_style',
   'mainbody_top' => 'gk_style',
   'mainbody_bottom' => 'gk_style',
   
   'sidebar' => 'gk_style',
   'inset' => 'gk_style',
   'top' => 'gk_style',
   'bottom' => 'gk_style'
);


i have put css in 'overide.css' and put css.overide/ON

when i want to choose position for my search module, the position 'search' isn't in the list of choice :blush:
User avatar
Junior Boarder

GK User
Tue Nov 13, 2012 11:21 pm
Reply with quote
Report this post
I've found... It's work ! :woohoo:

(problem with encoding UTF8 in templateDetails.xml) :whistle:

Thank's a lot again and again
User avatar
Junior Boarder

GK User
Fri Nov 16, 2012 2:48 am
Reply with quote
Report this post
Yeap that would not work
No problem ;)
User avatar
Platinum Boarder


cron