Announcement

Collapse
No announcement yet.

about the php menu

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Collectors-info
    replied
    Re: about the php menu

    Whoops! Should of seen that part. This will save even more time. Am working on a flash presentation to show all this working. Will let you view it 1st for a check up.

    Thanks again.

    Leave a comment:


  • navaldesign
    replied
    Re: about the php menu

    If you place all your menus and templates in a directory called "dir1" call them from whatever page, located in whatever folder, the command should be

    <?php
    include('/home/myusername/public_html/dir1/menu.php');
    ?>

    a " / " after dir1, not a dot "."

    Leave a comment:


  • Collectors-info
    replied
    Re: about the php menu

    Arh! Got it. So it’s actually its got similarities (in my mind) to the old iframe method, but just calling for a .php page.
    Presumably if I wanted keep things tidy & wanted to place all my templates/menu’s/ that I may wish to call up in a directory called “dir1” then I could use the code below on my target page.

    <?php
    include('/home/myusername/public_html/dir1.menu.php');
    ?>



    Thank you.

    Leave a comment:


  • navaldesign
    replied
    Re: about the php menu

    Originally posted by Collectors-info
    <?php
    include('/home/myusername/public_html/dir1.menu.php');

    ????? Sorry Chris, what does dir1.menu.php stand for?
    You simply make it:

    <?php
    include('/home/myusername/public_html/menu.php');
    ?>

    The directory where the specific page (the main pages, not the menu one) is, is not important. You simply call it from "public_html".

    Leave a comment:


  • larazovich
    replied
    Re: about the php menu

    Good one Chris..
    Man, you guys are great.

    Leave a comment:


  • Collectors-info
    replied
    Re: about the php menu

    Ah! Nice one Naval.
    Have I got this right? assuming I have the .php page with the menu on, published to the public_html directory. I would just place the codes below in the page html box according to the directory that a page is in?

    <?php
    include('/home/myusername/public_html/dir1.menu.php');
    ?>

    <?php
    include('/home/myusername/public_html/dir2.menu.php');
    ?>

    <?php
    include('/home/myusername/public_html/dir3.menu.php');
    ?>

    Leave a comment:


  • larazovich
    replied
    Re: about the php menu

    Thank You George.
    You are wonderful.

    Leave a comment:


  • navaldesign
    replied
    Re: about the php menu

    1. Yes
    2. The actual word home.
    3. replace username with your actual username

    Leave a comment:


  • larazovich
    replied
    Re: about the php menu

    Originally posted by navaldesign
    Oh yes, it WILL work. But, to make sure that the links will work through folders, the include command should be modified in

    include('/home/username/public_html/menu.php');

    There are other ways to link through folders, but they are different depending on the folder lavel. so i prefer this one.
    Thanks to both of you for your responses.
    Sorry to be so dim, but does this mean that instead of putting in the html box

    <?php
    include("menu.php");
    menu();
    ?>

    I should put

    <?php
    include('/home/username/public_html/menu.php');
    ?>

    and if so,
    so you mean the actual word home
    or do you mean the name of my website?(www.name of site.com)

    jeesh I feel so thick-skulled..

    thanks again..

    Leave a comment:


  • navaldesign
    replied
    Re: about the php menu

    Originally posted by Collectors-info
    Also remember this will not work across different directories/folders.
    Oh yes, it WILL work. But, to make sure that the links will work through folders, the include command should be modified in

    include('/home/username/public_html/menu.php');

    There are other ways to link through folders, but they are different depending on the folder level. so i prefer this one.

    Leave a comment:


  • Collectors-info
    replied
    Re: about the php menu

    Hi, publish all pages as .php. The one the menu is on & the page that the menu will land on.
    Correct on the changing all the links from html to php.

    Also remember this will not work across different directories/folders. So if you want the menu to open on pages in a different directory that you publish to, don’t forget to publish the menu to that directory as well.



    Good luck.

    Leave a comment:


  • larazovich
    started a topic about the php menu

    about the php menu

    I need a a couple of points clarified about the php menu thing from Naval.

    I have the menu bar made, and the page made, and I want to include it on lots of pages. So I follow the directions for placement, etc.

    So, now, do I understand correctly that I have to define and publish that page as php page?

    And, if so, then when I am making a link to it, the URL would end in .php, and NOT .html, right?

    Thanks for clearing this up for me.
Working...
X