Adding a position between Logo and Main Menu

GK User
Tue Apr 03, 2012 5:14 pm
I hate asking another question before my last question is answered- it makes me feel needy.

I am trying to add a module position between Logo and Main Menu. I opened the TemplateDetails.xml and it looks as if Logo and Main Menu are not actual module positions.

What I need to do is get another yellow line above my menu, like there is below the menu. What is my best plan of action for this?

This is a client site on a test domain. They gave me a website that they loved and want theirs very similar. I am frustrated because instead of me using my creativity I am modifying your beautiful template to something very simple.

URL is

http://www.mfielding.com/
User avatar
Expert Boarder

GK User
Wed Apr 04, 2012 2:16 pm
In your sample website yellow line is before maincontent and after maincontent so basically content in between lines.
If this is what you wanted you can use below changes.
Find File: \templates\gk_coffe\layouts\default.php
Find Lines: 98 to 110 which is below
Code: Select all
      <?php $this->loadBlock('nav'); ?>
       <div id="mainPage" class="gkWrap">   
          <?php $this->messages('message-position-2'); ?>
      
          <?php $this->loadBlock('header'); ?>
          
          <?php $this->loadBlock('top'); ?>
          
          <?php $this->loadBlock('main'); ?>
          
          <?php $this->loadBlock('user'); ?>
       </div>

Add an extra div tag to before and after div mainPage so it looks like below.
Code: Select all
      <?php $this->loadBlock('nav'); ?>
       <div id="mainbackground"></div> // Your Yellow line
       <div id="mainPage" class="gkWrap">   
          <?php $this->messages('message-position-2'); ?>
      
          <?php $this->loadBlock('header'); ?>
          
          <?php $this->loadBlock('top'); ?>
          
          <?php $this->loadBlock('main'); ?>
          
          <?php $this->loadBlock('user'); ?>
       </div>
      <div id="mainbackground"></div>  // Your Yellow line


Add following css to css/override.css and enable it in temlate settings > advanced settings > css override.
Code: Select all
#mainbackground { background: url('../images/yellowlinegrade.png') no-repeat; height: 25px; width: 900px; margin: auto; }

Change image details based on where your image is , currently for tested code image is in /templates/gk_templatename/images/

If you want to specifically load modules let me know.

See you around...
User avatar
Platinum Boarder

GK User
Wed Apr 04, 2012 5:25 pm
Trying to add a line between the module positions as shown below. I attempted to use these directions:

https://www.gavick.com/documentation/jo ... -position/

But Logo and Main Menu are not listed as module positions in the XML File.

I would like to have them in a module position because the client is going to want to periodically change them.

Image
User avatar
Expert Boarder

GK User
Thu Apr 05, 2012 6:08 am
In xml file you do not have to define your position between logo and menu. Just write it in a new line similar to current position definitions.

Xml file just defines positions so you can select them in module settings when choosing position.

Main file you need to get right is php code which is in default.php in "layout" folder.

See you around...
User avatar
Platinum Boarder


cron