Insert Date at right site from menu

GK User
Thu Feb 09, 2012 1:13 pm
Hello Team,

I have a really special question. Is is maybe possible to insert a date at the right site from menu?
date.jpg


Thanks for your answers :P
Melanie
User avatar
Junior Boarder

GK User
Thu Feb 09, 2012 1:29 pm
Hi Melanie,

Yes it's possible.

- Open: \templates\gk_musicity\layouts\blocks\nav.php

- Add:
Code: Select all
<span id="nav-date"><?php echo date("m-d-Y");?></span>

After:
Code: Select all
<?php
         $this->menu->loadMenu($this->getParam('menu_name','mainmenu'));
          $this->menu->genMenu($this->getParam('startlevel', 0), $this->getParam('endlevel',-1));
      ?>
User avatar
Platinum Boarder

GK User
Thu Feb 09, 2012 1:33 pm
Edit: Lol Don Lee you beat me to it ;)

See image on how it looks. Tested on 1.7 quickstart package.
Code: Select all
http://i44.tinypic.com/1zvy6ud.jpg

For Joomla version 1.7
Find File: \templates\gk_musicity\layouts\blocks\nav.php
Find Lines: 10 to 23 which is below
Code: Select all
<div id="gkMainNav" class="gkWrap">
   <div id="gkMenu">
      <?php
         $this->menu->loadMenu($this->getParam('menu_name','mainmenu'));
          $this->menu->genMenu($this->getParam('startlevel', 0), $this->getParam('endlevel',-1));
      ?>
   
      <?php if($this->generateSubmenu && $this->menu->genMenu($this->getParam('startlevel', 0)+1, $this->getParam('endlevel',-1), true)): ?>
      <div id="gkSubmenu" class="clear">
            <?php $this->menu->genMenu($this->getParam('startlevel', 0)+1, $this->getParam('endlevel',-1));?>
      </div>
      <?php endif;?>
   </div>
</div>

Replace with below
Code: Select all
<div id="gkMainNav" class="gkWrap">
   <div id="gkMenu">
      <?php
         $this->menu->loadMenu($this->getParam('menu_name','mainmenu'));
          $this->menu->genMenu($this->getParam('startlevel', 0), $this->getParam('endlevel',-1));
      ?>
      <div id="gkDate">
         <span> <?php echo JHTML::_('date', 'now', 'l,d F Y'); ?></span>
      </div>
      <?php if($this->generateSubmenu && $this->menu->genMenu($this->getParam('startlevel', 0)+1, $this->getParam('endlevel',-1), true)): ?>
      <div id="gkSubmenu" class="clear">
            <?php $this->menu->genMenu($this->getParam('startlevel', 0)+1, $this->getParam('endlevel',-1));?>
      </div>
      <?php endif;?>
   </div>
</div>

Find File: \templates\gk_musicity\css\override.css
Add below css then save and close.
Code: Select all
#gkDate { float:right; position: relative; top:0px ; padding-right: 12px; }
#gkDate span { color: #fff; font-family: WinterthurCondensed,Arial,sans-serif; font-size: 14px; }

Enable Css Override option from template settings > Advanced Settings > Css override.

For your records copy and paste this content into text file and name it datemod.txt so incase you update you can redo your mod.
User avatar
Platinum Boarder

GK User
Thu Feb 09, 2012 1:44 pm
You are so great!!! Perfect!!! Thank you :woohoo:
The last posting help and works ...

excellent...superior...great...wonderful :silly:
User avatar
Junior Boarder

GK User
Thu Feb 09, 2012 2:06 pm
he he we are always so glad to help you out.

Thanks @Norman for sufficing solution.

Have a nice day guys!
User avatar
Platinum Boarder


cron