Support Forum

Please note that this forum is only available to you in read only mode. In order to contribute to this conversation you will need to renew your subscription.

Top Row Modules in Sticky Nav?

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Hi,

I know this is an old template but is there any quick and easy way to force the top row positions to stay on the sticky nav?

I'm trying to tweak a client site with out making any major template changes at this time to include social icons at top of page. I published the logo in top 1 and the social icons in top4. I unpublished the logo from the template settings and set to 1 wide while making the menu position 11 wide.

It looks ok for now but right now as the page scrolls down, the menu sticky goes over top of the top1 and top4 positions and I would like to keep the logo and social icons visible.

Live site can be seen at www.cfofm.org

Any help or suggestions would be much appreciated.

Thanks Don
  • roinuj's Avatar
  • roinuj
  • 12 Month basic
  • 99 posts
  • Karma: 0
The administrator has disabled public write access.
I think the easiest way would be to move the contents of the top block file into the nav block.

To stop any changes being wiped on an update, try creating a new file at

/tpls/blocks/nav-custom.php

and then copy the contents of nav.php into that file.

Then open

/tpls/blocks/top.php

and copy the code after the line
defined('_JEXEC') or die;

paste that into the new file at lne 43 (In the latest download) after
<?php if($this->params->get('stickynav')) { ?>
 <nav id="navwrap" class="<?php echo $mobiletype; ?>" data-uk-sticky>
<?php } else { ?>
 <nav id="navwrap" class="<?php echo $mobiletype; ?>">
<?php } ?>

Then save the file.

In the template admin, make sure you are using a custom layout, and not one that comes with the theme.

Open up the coresponding layout file in the /tpls folder. EG if the layout is called 'Default Custom' the layout file will be called layout-custom.php.

In that file, remove the call to the original top block:
$this->loadBlock ('top')

and then change the call to the nav block to point to the new file
$this->loadBlock ('nav-custom')

The top positions should then load within the stickynav.

You may need to update some styling to make the positions look the same after moving them.

Regards,

Rob
  • Robert Went's Avatar
  • Robert Went
  • Moderator
  • 2210 posts
  • 196 Thanks
  • Karma: 90
The administrator has disabled public write access.
The following user(s) said Thank You: manh

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers