Adding a module position at the top

October 2015 Joomla Template
Rate this topic: Evaluations: 2, 3.00 on the average.Evaluations: 2, 3.00 on the average.Evaluations: 2, 3.00 on the average.Evaluations: 2, 3.00 on the average.Evaluations: 2, 3.00 on the average.3.00 out of 6 based on 2 vote(s)
GK User
Wed Aug 03, 2016 3:29 pm
Reply with quote
Report this post
Dears,

Is it possible to have a whole page wide position at the top exactly like "bannertop" but above the menu and everything?
I need to add a page-wide banner to the top.
It would be much appreciated if you could point me to the right direction.

Thanks,
M
User avatar
Senior Boarder

teitbite
Sun Aug 07, 2016 12:47 pm
Reply with quote
Report this post
Hi

Please edit file /layout/blocks/default.php and right after opening <body> tag add this line:

Code: Select all
                   <jdoc:include type="modules" name="newposition" style="none" />


than You will be able to use "newposition" as a module position.
User avatar
Moderator

GK User
Mon Aug 08, 2016 2:18 pm
Reply with quote
Report this post
Thanks a bunch, This is exactly what I need but the only difference is that I need this to be at the top of the Top Menu but this goes on the bottom of the menu. Would you please guide me further? (Please see the image below)
gavick-module.JPG


Thank you
M.
User avatar
Senior Boarder

teitbite
Thu Aug 11, 2016 1:31 pm
Reply with quote
Report this post
Hi

If You have added this module position under the opening <body> tag directly than there is nothing which can be higher than that. Your problem is that header is fixed and basically it's showing over this new module.position. Try if disabling fixed menu in template settings will resolve it.
User avatar
Moderator

GK User
Wed Aug 24, 2016 3:58 pm
Reply with quote
Report this post
Dear teitbite,
I checked everywhere and could not find an option to disable the fixed menu. Are you sure that there is such option in template settings?

Thanks
M.
User avatar
Senior Boarder

teitbite
Fri Aug 26, 2016 10:50 am
Reply with quote
Report this post
Hi

There have to be since I can see it in demo, but lets just overwrite it with css. It's much faster I guess :)

Code: Select all
#gkPageTop {
    position: relative;
    top: 0 !important;
}
User avatar
Moderator

GK User
Sun Aug 28, 2016 8:33 am
Reply with quote
Report this post
Hi
Thank you very much.I actually tried forcing the position to be relative instead of fixed before but it leaves me with a white space at the top, even though I tried -as you kindly wrote as well- Top: 0 !important;
Capture.JPG

Your kind help would be much appreciated as always :)
BTW: Since it changed the layout I could not keep the override but you still have the access via PM. That's still valid if needed.

Thanks,
M.
User avatar
Senior Boarder

teitbite
Wed Aug 31, 2016 12:17 pm
Reply with quote
Report this post
Hi

I think this white space was a part of this new module position. Have You tried to publish something thre to check? Anyway now I do not know what to advice without seeing it anymore.
User avatar
Moderator

GK User
Tue Sep 06, 2016 7:26 am
Reply with quote
Report this post
Dear teitbite,
I sent you the info via PM on Wed Aug 31, 2016 12:55 pm.
Thanks,
M.
User avatar
Senior Boarder

teitbite
Wed Sep 07, 2016 9:06 am
Reply with quote
Report this post
Hi

Thank You for letting me know, I'm being flooded with PMs so it always take some time till I get to something important.

#gkPageTop[style="top: 0px;"] {
position: fixed;
}
User avatar
Moderator

teitbite
Wed Sep 07, 2016 9:15 am
Reply with quote
Report this post
Hi again. Soryy, this piece of code supposed to go to Custom CSS of Your site, but I've copied it and saved here by accident.

Anyway the code worked pairially only, site can get jumpy with this, so I'm afraid after adding this new module position the animation with menu on top of the page while scrolling is gone. Sorry but I do not see a way which will not require a massive template's code changes to make this work as before.

To reduce the gap on top You just need code like:

Code: Select all
body { padding: 0; }
User avatar
Moderator

GK User
Wed Sep 07, 2016 12:15 pm
Reply with quote
Report this post
Hi there dear teitbite,
You have done more than enough. Thank you very much, I'd try to go on as suggested.
Best,
M.
User avatar
Senior Boarder

teitbite
Fri Sep 09, 2016 8:33 am
Reply with quote
Report this post
Hi

Sorry I couldn't help with this particular problem one more time. I'm closing this thread now.
User avatar
Moderator


cron