Single Menu Page with Bv and PHP

Collapse
This topic is closed.
X
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • davidundalicia
    replied
    Re: Single Menu Page with Bv and PHP

    Try this:

    <? function submenu() { ?>

    ------------------------------------------

    <?php
    include ("sub-menu.php");
    submenu();
    ?>

    --------------------------------------------

    as you can see, I have just changed names to avoid a conflict with the existing function.

    remove the menu function from the pages where its not required.

    As naval has pointed out, you can have as many different functions on a page as you wish......just change some names.

    Leave a comment:


  • Collectors-info
    replied
    Re: Single Menu Page with Bv and PHP

    Hi, is it possible you need to bring the html box on your main page to the front?????.
    You would be better posting the url for the main page.

    Leave a comment:


  • ofirbeigel
    replied
    Re: Single Menu Page with Bv and PHP

    This is like the longest thread ever. I have another question - tried to find the answer in this thread but with no success.

    I am using a template which is save as menu.php on each and every page.
    On some groups of pages I want to add a sub menu that will be used for navigation within that sub group - of course that menu should not show up on all of the pages.

    What I did is create a new file and called it sub-menu.php
    inside the HTML of the sub-menu.php I put in the code:
    <? function menu() { ?> in the beginning
    and the code <?
    }
    ?>

    at the end.

    Than inside a page of my subcategory I put an HTML box with the code:
    <?php
    include ("sub-menu.php");
    menu();
    ?>

    I published them all. For some reason I still didn't get the sub-menu on my page and I am wondering what did I do wrong ?

    I remind you that there is already a PHP menu on this page - maybe that's the problem ?

    Please advise.

    Thanks.
    Ofir.

    Leave a comment:


  • vidalcarmen
    replied
    Re: Single Menu Page with Bv and PHP

    Thanks soooo much, I just did it with my 20 or so pages. Publishing them is a pain!

    Leave a comment:


  • ofirbeigel
    replied
    Re: Single Menu Page with Bv and PHP

    yes I know I was answering the post before me :) but thanks.

    Leave a comment:


  • mumu
    replied
    Re: Single Menu Page with Bv and PHP

    Originally posted by ofirbeigel View Post
    But than if you need to change something in the menu you need to access each page on your site and change it instead of changing just one file that will later upload it self into every page on your site.
    If you want to make a change you just change your menu (don't need to access each page) upload it in all your folders and automaticaly changes the menu in all your pages.
    So you just have to change one page (your menu) and publish one page (your menu) and all the pages in your site will have the new menu, Just like that!!
    It works beautiful
    Thanks for the tip Naval

    Leave a comment:


  • davidundalicia
    replied
    Re: Single Menu Page with Bv and PHP

    I have used naval's php menu idea and have also used text links.

    Just remember that ANY page that will include the php menu MUST be saved as php and not html...............thanks naval..........

    Leave a comment:


  • ofirbeigel
    replied
    Re: Single Menu Page with Bv and PHP

    But than if you need to change something in the menu you need to access each page on your site and change it instead of changing just one file that will later upload it self into every page on your site.

    Leave a comment:


  • navaldesign
    replied
    Re: Single Menu Page with Bv and PHP

    And, after you have published a 200 pages site, and you want to change a link ? what will you do ? Copy / paste / save / publish 200 pages ?

    This is what this thread is about: how to avoid doing this, and only edit / save / publish ONE page, automatically updating all the site pages.

    Leave a comment:


  • trebzky
    replied
    Re: Single Menu Page with Bv and PHP

    I think the easiest way is to copy and paste the menu from your main page in every page you make if you want to use the same menu....i tried it and works fine. Just lock the menu so when you paste it to other pages it will reside exactly at the same place in the new page and locked as well.

    Leave a comment:


  • navaldesign
    replied
    Re: Single Menu Page with Bv and PHP

    Yes, it is ok to have all the necessary tags in the main page

    Leave a comment:


  • ofirbeigel
    replied
    Re: Single Menu Page with Bv and PHP

    A question about the meta tags using this system.
    is it ok if I have meta tags on the page where the menu.php HTML code is pasted (not on the menu.php file itslef) ?
    or do I need to have no meta tags whatsoever on pages that include the menu.php html code ?

    Leave a comment:


  • Collectors-info
    replied
    Re: Single Menu Page with Bv and PHP

    Originally posted by navaldesign View Post
    No, you are correct. If the images used in the menu page are (as the menu page itself) in different folder, the images MUST be provided in the BV page, as absolute URLs. So, when you want to insert in your BV page an image, let's call it "logo.jpg", you should provide also the absolute URL for it instead of simply showing the pah in your local computer.

    Usually, pages built by pros, have all images uploaded in a folder of their own, and retrieved from there. So in the BV page, you should provide the image source as http://www.yourdomain.com/images/logo.jpg The same problem (even greater in fact) exists also for the classic BV menus, where buttons are images.

    As you see, that might be a bit complicated, and that is why i have suggested that the easier way, at least for the average user, is to publish the menu in those two or three folders that he might have.
    I thought it might be this. But also thought i might be missing something. Dont feel so daft now. lol

    Cheers George.

    Leave a comment:


  • navaldesign
    replied
    Re: Single Menu Page with Bv and PHP

    No, you are correct. If the images used in the menu page are (as the menu page itself) in different folder, the images MUST be provided in the BV page, as absolute URLs. So, when you want to insert in your BV page an image, let's call it "logo.jpg", you should provide also the absolute URL for it instead of simply showing the pah in your local computer.

    Usually, pages built by pros, have all images uploaded in a folder of their own, and retrieved from there. So in the BV page, you should provide the image source as http://www.yourdomain.com/images/logo.jpg The same problem (even greater in fact) exists also for the classic BV menus, where buttons are images.

    As you see, that might be a bit complicated, and that is why i have suggested that the easier way, at least for the average user, is to publish the menu in those two or three folders that he might have.

    Leave a comment:


  • Collectors-info
    replied
    Re: Single Menu Page with Bv and PHP

    Hi, i maybe doing something daft here? But it wont bring any images across from the root directory. This page is the only one in the new directory & links on the page will go back to the public_html area to show the working pages. So don't be confused as this works fine. Any ideas?

    PS, i may also have this part wrong? But if you use the BV logo tool, it seems to be missing something, as when i tried this on the header, it seemed to be distorted in the new/remote directory, as if a file was missing that load the image.

    Leave a comment:

Working...
X