Database-generated nav menu?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • barrygoodz@gmail.com

    Database-generated nav menu?

    I'm building a site that will display information on about 50
    products. On each product page there is a right-hand nav menu linking
    to various related documents. I would like to have this menu generated
    from an external file, thus enabling me to quickly change the contents
    of the menu when the need arises.

    Though the menu structure is the same for each page, the files that
    the menu links to differ from product to product. I'm not that
    familiar with databases but suspect that I should be looking in that
    direction to solve this problem.

    I'm not looking for someone to explain the whole thing to me, only to
    pointed in the right direction and perhaps some useful advice.

    Any input would be appreciated.

    Thanks,
    Barry
  • dorayme

    #2
    Re: Database-generated nav menu?

    In article
    <2bb3338d-cf55-4901-8296-9582a2f0f271@d4 5g2000hsc.googl egroups.com>,
    barrygoodz@gmai l.com wrote:
    I'm building a site that will display information on about 50
    products. On each product page there is a right-hand nav menu linking
    to various related documents. I would like to have this menu generated
    from an external file, thus enabling me to quickly change the contents
    of the menu when the need arises.
    >
    Though the menu structure is the same for each page, the files that
    the menu links to differ from product to product. I'm not that
    familiar with databases but suspect that I should be looking in that
    direction to solve this problem.
    >
    I'm not looking for someone to explain the whole thing to me, only to
    pointed in the right direction and perhaps some useful advice.
    >
    Any input would be appreciated.
    >
    You say the menu is the same structure, how about an example of a few
    pages to illustrate with URL? I have found it to be very convenient with
    commercial sites that have different sections (each with a class of
    products) to have the menu as an include (I use a php one) and they can
    then be changed easily whenever there is a change in the client's
    products. But you might describe with an example for further discussion.

    --
    dorayme

    Comment

    • osnot

      #3
      Re: Database-generated nav menu?

      barrygoodz@gmai l.com wrote:
      I'm building a site that will display information on about 50
      products. On each product page there is a right-hand nav menu linking
      to various related documents. I would like to have this menu generated
      from an external file, thus enabling me to quickly change the contents
      of the menu when the need arises.
      >
      >
      I use a files-based CMS where each "page" is actually a directory
      that contains html fragments, where each such fragment gets stuffed
      into a <div(#header, #footer, #main-disp, #aux-disp, #globalnav,
      #localnav) using file_get_conten ts($divpath)

      #globalnav is a horizontal bar of css dropdown menus, that never
      change (same on every page, no matter what).

      #localnav is a navigation bar that can be customized on a per
      page-group and/or per-individual page basis. Those links also
      come from file_get_conten ts()

      /templates/dirs/tools/handtools/_-chisels (tools is a dir, chisels is a
      page)

      The leading _- before chisels tells the system this is a leaf-level page
      to create.

      The _-chisels dir contains a collection of div fragments,
      plus link lists. This system wasn't hard to write and it works well for me.

      the link would be ?page=tools/handtools/chisels

      Comment

      • Roy A.

        #4
        Re: Database-generated nav menu?

        On 22 Aug, 16:32, barrygo...@gmai l.com wrote:
        I'm building a site that will display information on about 50
        products. On each product page there is a right-hand nav menu linking
        to various related documents. I would like to have this menu generated
        from an external file, thus enabling me to quickly change the contents
        of the menu when the need arises.
        >
        Though the menu structure is the same for each page, the files that
        the menu links to differ from product to product. I'm not that
        familiar with databases but suspect that I should be looking in that
        direction to solve this problem.
        You could use one include file for the menu, an in the included file
        make a switch between the menus basted on the URL. A database
        would work, but it is not necessarily the best option.

        Comment

        Working...