Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Basic Pages - top menu links appear underneath bar (2nd pages link onwards)

Hi @Shadowdare,

Thank you for an awesome plugin. It really has helped me to personalise my forum.

I have several pages created, and three that I want displayed on the top Menu as text links. I have ticked the required box, and they do display. The first one is where it should be, but the second link is directly underneath the first one (and not by the side). The third link is by the side of the second link. Please see screenshot attached (I am logged in as Admin, I've moved the Dashboard link to see if that makes more room - which it's made no difference).

I am running 2.0.18.8, and have the latest BasicPages 1.8 installed.

Many thanks,
Lisa.image

Comments

  • It probably has to do with compatibility with css and theme layout for menu nesting.

    to avoid this you could try changing this (I haven't tested in basicpages, but I know something similar worked successfully when writing one of my plugins).

    basicpages/settings/class.hooks.php

    line 35:

    $Sender->Menu->AddLink('BasicPages', $Page->Name, PageModel::PageUrl($Page), FALSE, array('class' => 'Page-' . $Page->UrlCode));
    
    
    to
    
    $Sender->Menu->AddLink($Page->Name, $Page->Name, PageModel::PageUrl($Page), FALSE, array('class' => 'Page-' . $Page->UrlCode));
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • hgtonighthgtonight ∞ · New Moderator
    edited October 2013

    I see the same issue on 2.0.18.8. This does not occur on 2.1b2.

    From what I can tell, it has to do with the grouping of links.

    EDIT - @peregrine did much of what I did. Using a different group for each link prevents the automatic sublists.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • I noticed different themes exhibited different ways of displaying menu based on grouping.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Guys thanks (again) so much for your help!
    I'll do it now :)

  • EDIT - @peregrine did much of what I did. Using a different group for each link prevents the automatic sublists.

    lol - what did you did?

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Wow!!
    That simple! I did it, AND without making it difficult for myself ;)
    All works - thanks!!!!

  • peregrineperegrine MVP
    edited October 2013

    @marthajane77 said:
    Wow!!
    That simple! I did it, AND without making it difficult for myself ;)
    All works - thanks!!!!

    great. sometimes 10 second changes took hours figuring out in previous adventures.

    if the first parameter is unique in each addlink it will not nest in any theme. If they are the same it will nest in certain themes.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • hgtonighthgtonight ∞ · New Moderator
    edited October 2013

    @peregrine said:
    lol - what did you did?

    I added a numeric index.

    foreach($Pages as $Index => $Page) {
      $Sender->Menu->AddLink('BasicPages-' . $Index, $Page->Name, PageModel::PageUrl($Page), FALSE, array('class' => 'Page-' . $Page->UrlCode));
    }
    

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • peregrineperegrine MVP
    edited October 2013

    hg another spin on a solution. thx for sharing

    marthajane and hg since you both provided prompt feedback - you too also deserve an insightful and an awesome, respectively.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • ShadowdareShadowdare r_j MVP
    edited October 2013

    @hgtonight said:
    I see the same issue on 2.0.18.8. This does not occur on 2.1b2.

    From what I can tell, it has to do with the grouping of links.

    EDIT - peregrine did much of what I did. Using a different group for each link prevents the automatic sublists.

    A couple of the menu items in Vanilla had the same first parameter with no problems. I didn't notice this problem with the default theme in both 2.0.18.8 and 2.1+, so it seems to depend on the theme. Anyway, this would be one way to implement drop-down menus.

    @hgtonight, I will be updating the app with the numeric index fix soon.

    Thanks for taking a look @peregrine and @hgtonight.

    @marthajane77, thanks for checking out Basic Pages!

    Add Pages to Vanilla with the Basic Pages app

  • Thanks @Shadowdare, and as I said before it's truly awesome! It has made a huge difference to the development of my forum :)

  • ShadowdareShadowdare r_j MVP
    edited October 2013

    @marthajane77, it's amazing how something as simple as pages make a huge improvement for websites! :)

    I've just released Basic Pages 1.8.1 with a fix similar to @hgtonight's, but with the unique Page ID instead of the object index.

    Add Pages to Vanilla with the Basic Pages app

Sign In or Register to comment.