Few questions on template menu

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
Mon Sep 15, 2014 11:14 pm
Reply with quote
Report this post
Hello,
I'm using the template menu as default menu of my site (onepage) and I would like, any time I click on a menu item to reach a specific module position (bottom1-2, 1-3, 1-4, etc), that the menu item itself turn into its active state (meaning changing color).
This thing is not happening, the only menu item that keeps staying in its active state is the HOME button.
I tried to check on the demo page of Creativity and I realised that what the menu behaviour I'm trying to achieve is not set even there. But the "home" button is not present in the demo.
Now, is it possible to get to my first point?
If not, I can I at least get rid of the "menu" button? Right now is the predefined menu item, therefore it cannot be erased. I realise that this sounds reeeeaaally as a supernewbie question, but right now is how I feel :?
Any suggestion?

Thank you very much,

Matteo
User avatar
Senior Boarder

teitbite
Thu Sep 18, 2014 8:40 am
Reply with quote
Report this post
Hi

To hide "Home" menu element You need to select in it's settings to "No" for "Show title".

The thing with menu activity while using anchors is not implemented, so I'm afraid it would require a customisation to template's code and we do not support that.
User avatar
Moderator

GK User
Sun Sep 21, 2014 4:33 pm
Reply with quote
Report this post
Thank you very much for the answer.

I have another question that now is bothering me on the menu...

I have a "comb" structure of the website, meaning that the home onepage style is the handle, then I have some "lateral" pages that need to mantain the main menu and, on click, get back to the right point of the homepage. I'm therefore forced to set the anchors as absolute path instead than relative (e.g. http://www.mysite.com/#gkBottom1-3). Everything works perfectly, except that I completely lost the fading effect...now the whole page simply "jump" to the right point....any idea why?

I've had the same structure on a creativity-template website on Joomla! 2.5 and I've had no such an issue....

Thank you very much

Matteo
User avatar
Senior Boarder

teitbite
Mon Sep 22, 2014 9:58 am
Reply with quote
Report this post
Hi

That's odd that it works in creativity. It's the same script:

Code: Select all
   // SmoothScroll jQUery substitue
   jQuery('a[href^="#"]').click( function (e) {
       e.preventDefault();
       var target = this.hash,
       $target = jQuery(target);
      
       if($target.length) {
          jQuery('html, body').stop().animate({
              'scrollTop': $target.offset().top
          }, 1000, 'swing', function () {
              window.location.hash = target;
          });
       } else {
          window.location.hash = target;
       }
   });


please show me the Creativity based site where I will be able to compare the difference.
User avatar
Moderator

GK User
Tue Sep 23, 2014 11:53 am
Reply with quote
Report this post
Well, actually, as soon as I sent the message I realized that was I just told you was weird. Therefore I thought I duplicated the menu in the old website and I forgot about it...but I open the old website and I realized that I did not...or better...there are few menus (it's a multilanguage site), but all of them have absolute path.
You can check it at www.europeisanarchipelago.com

Any idea on what I DID to achieve such a behaviour????

Thank you

Matteo
User avatar
Senior Boarder

teitbite
Tue Sep 23, 2014 1:59 pm
Reply with quote
Report this post
Hi

Haha. I've just noticed that the link to the page I thought is Yours is just an example :) So I have nothing to compare the creativity template with. Please tell me the url to Your current site.
User avatar
Moderator

GK User
Tue Sep 23, 2014 4:05 pm
Reply with quote
Report this post
User avatar
Senior Boarder

teitbite
Wed Sep 24, 2014 3:16 pm
Reply with quote
Report this post
Hi

Try disable "mod_accordeonck" and check than. There is no differnce at all, so I would say it has to be a javascript conflict.

If disabling will not make difference please send me an access to ftp.
User avatar
Moderator

GK User
Wed Sep 24, 2014 10:53 pm
Reply with quote
Report this post
Dear Teitbite,
tried to disable "mod_accordeonck", but nothing changed. I send you ftp access via PM, thank you.

Then, if the javascript conflict is what is causing the problem, do you have any suggestion of a module that I can use to have an accordion menu such as the one I need?

Thank you again,

Matteo
User avatar
Senior Boarder

teitbite
Thu Sep 25, 2014 8:06 am
Reply with quote
Report this post
Hi

If nothing changed than it's not the module I've mentioned. It was just a module I do not know, so it was safe to check it first.

I've tried the FTP, but all I got is a message:

530 Login non corretto. Please contact your web hosting service provider for assistance.
User avatar
Moderator

GK User
Thu Sep 25, 2014 10:08 am
Reply with quote
Report this post
That's weird...

I tried to PM you again.

Matteo
User avatar
Senior Boarder

teitbite
Thu Sep 25, 2014 4:00 pm
Reply with quote
Report this post
Hi

I cannot figure out why it's not working. I've send a question to programmers to check it. Will let You know when I'll get the answer.
User avatar
Moderator

GK User
Thu Sep 25, 2014 4:03 pm
Reply with quote
Report this post
Excellent. Thank you very much. Waiting here for solution.

Please let me know when I can change the ftp login's credentials.

Matteo
User avatar
Senior Boarder

teitbite
Thu Sep 25, 2014 9:06 pm
Reply with quote
Report this post
Hi

You have an older jQuery version used which could not process the code for smooth scroll. Programmers has help with a more flexible version working with the library version You got:

Code: Select all
jQuery(document).ready(function() {
    // smooth anchor scrolling
    jQuery('a').on('click', function (e) {     
        if(this.hash !== '') {
            e.preventDefault();
            var target = jQuery(this.hash);
            console.log(target.offset().top);

            jQuery('html, body').stop().animate({
                'scrollTop': target.offset().top
            }, 1000, 'swing', function () {
                window.location.hash = target.selector;
            });
        }
    });
});
User avatar
Moderator

GK User
Fri Sep 26, 2014 8:15 am
Reply with quote
Report this post
What can I say?

Thank you!

M
User avatar
Senior Boarder

teitbite
Sat Sep 27, 2014 10:53 am
Reply with quote
Report this post
Hi

No problem. Glad I could help :)
User avatar
Moderator

GK User
Mon Sep 29, 2014 8:22 am
Reply with quote
Report this post
Dear Teitbite,
I realized just now that somehow during the fix something had messed up.

Now the menu items are set with external absolute url and the smooth scroll works perfectly...but the menu itself does not.

Go to www.faqtotumwebdesignermilano.it/ardop and navigate to one of the internal page (e.g. http://www.faqtotumwebdesignermilano.it ... ic-mirrors) to understand what I'm talking about.

Thank you,

M
User avatar
Senior Boarder

teitbite
Mon Sep 29, 2014 5:37 pm
Reply with quote
Report this post
Hi

There is nothing in code to affect that, but please disable cache so I'll remove the code to check.
User avatar
Moderator

GK User
Mon Sep 29, 2014 10:36 pm
Reply with quote
Report this post
Cache disabled.

Thank you.

M
User avatar
Senior Boarder

GK User
Mon Sep 29, 2014 10:59 pm
Reply with quote
Report this post
One more info that let me think that the problem is still related to the jQuery and that is not solved:
using mobile navigation (or reduced width browser) the menu loses its smooth scroll function...and the navigation works perfectly.

Thank you again,

M
User avatar
Senior Boarder

teitbite
Wed Oct 01, 2014 9:05 am
Reply with quote
Report this post
Hi

I cannot figure it. I've commented out the code I've added last time and checked after an hour and site is still using it. I think cache is still working. Please disable any cache. Either joomla or server cache.
User avatar
Moderator

GK User
Wed Oct 01, 2014 9:39 am
Reply with quote
Report this post
Hi,

Joomla! cache as following:

Plug-in System-Cache: disabled
System-->Global Config-->System: Cache NO - disabled
Clear cache: DONE filtering both site & administrator

As far as my server is concerned...well...I just don't know how to clear its cache.

M
User avatar
Senior Boarder

GK User
Wed Oct 01, 2014 9:41 am
Reply with quote
Report this post
Ok.

Now it's working...but the smooth scrolling effect is long gone again...
User avatar
Senior Boarder

teitbite
Thu Oct 02, 2014 12:11 pm
Reply with quote
Report this post
Hi

I've disabled joomla cache already. I meant server cache. It's still making site show changes after some time.

But leave it like it's now and send me an access to joomla panel. I will try a newer jQuery version to make the default template code work.
User avatar
Moderator

GK User
Thu Oct 02, 2014 1:16 pm
Reply with quote
Report this post
Hi,

Access sent on your Gmail account.

Thank you again

M
User avatar
Senior Boarder

teitbite
Thu Oct 02, 2014 1:35 pm
Reply with quote
Report this post
Hi

Please activate it or extend permissions. I'm not able to login to administrator panel:


Warning

You do not have access to the administrator section of this site.

User avatar
Moderator

GK User
Thu Oct 02, 2014 1:42 pm
Reply with quote
Report this post
Sorry.

My mistake.

Now is ok.
User avatar
Senior Boarder

teitbite
Thu Oct 02, 2014 2:03 pm
Reply with quote
Report this post
Hi

My idea failed. I honestly do not know why even newer jQuery version is not fixing this problem. I think a solution may be to load jQuery 1.9 from server directly, but it's just another test.

So not to keep You waiting with this I've used a trick. I took the code which worked previously on frontpage and not on rest of the pages and used it on frontpage only. So now menu will work, but it's not a real solution. Anyway Your site should be fine now.

About the padding question from mail I think it works correctly. Can You show me how is it for You ?

Code: Select all
jQuery(document).ready(function() {
    // smooth anchor scrolling
    jQuery('.onepage a').on('click', function (e) {     
        if(this.hash !== '') {
            e.preventDefault();
            var target = jQuery(this.hash);
            console.log(target.offset().top);

            jQuery('html, body').stop().animate({
                'scrollTop': target.offset().top
            }, 1000, 'swing', function () {
                window.location.hash = target.selector;
            });
        }
    });
});

User avatar
Moderator

GK User
Thu Oct 02, 2014 2:34 pm
Reply with quote
Report this post
Hi Teitbite,

the workaround works...and that is enoughnt for the time being...thank you...if you plan to do further work on the subject, please let me know with email if you'll get to a point.

As far as the padding question is concerned...well...it does NOT work! Clicking on "Company" you are taken halfway through the module...and the same happens in the following...e.g. "Products" module begins with the colored stripe...that is completely lost when you click on the menu.

M
User avatar
Senior Boarder

teitbite
Sat Oct 04, 2014 10:49 am
Reply with quote
Report this post
Hi

I think this cannot be done. this paddings were there to show it correctly, so without it header will alway cover it. This is how anchor works, opens anchored element on top of the screen.
User avatar
Moderator

GK User
Sat Oct 04, 2014 4:25 pm
Reply with quote
Report this post
Sorry,
you mean that I cannot change the 102px padding of the module in order to decrease the vertical space between them?
The decrease of the space was what I was trying to achieve...
User avatar
Senior Boarder

teitbite
Sun Oct 05, 2014 8:59 am
Reply with quote
Report this post
Hi

You can, but that it will be covered with header. I really do not know how to do this. When You hit an anchor link than the place where anchor is located is being moved to the top of the screen. This is how HTML works, and to make it show lower You need to use padding, which You are trying to remove, so it will be overed. Maybe if You will disable fixed menu in frontpage is a solution for You ?
User avatar
Moderator

GK User
Mon Oct 06, 2014 12:08 am
Reply with quote
Report this post
Hello Teitbite,
now I understand and...it obviously makes perfect sense. Unfortunately the disabling of the fixed menu is something I cannot consider.

Here's the workaround I figured out...is not very classy, but it's working...

For the first bottom module I added a module position with absolute position and no content at the right distance from the top of the page and I used it only as a anchor.

Then I choosed to try avoiding absolute positioning for the whole page (in case content is changed in the future) so I used as anchor for the second module a div with no content at the bottom of the first module.

Due to the structure of the page (and to the exhausting attention of my client to pixel distance between blocks), I'm still trying to figure out the best solution for the following modules...

M
User avatar
Senior Boarder

teitbite
Mon Oct 06, 2014 8:30 pm
Reply with quote
Report this post
Hi

Ok. If it works than great, but I must say I do not understand it at all :)

Honestly I have no ideas how to resolve this problem. I've tried: adding a margin to body, recodding script to fall -40px from anchor and play with margins with negative values. But nothing works, sorry.
User avatar
Moderator

GK User
Mon Oct 06, 2014 11:15 pm
Reply with quote
Report this post
I ended the task. As I said, not classy but working. If you take a look at the page maybe ypu will understand what I did.

Thank you anyway for your kind attention.

More questions are ready to be asked in new posts ;)

M
User avatar
Senior Boarder

teitbite
Wed Oct 08, 2014 11:05 am
Reply with quote
Report this post
Hi

Ok. You can send me links by PM to new questions and give me a chance to make up for this unresolved (by me) padding problem than :)
User avatar
Moderator


cron