navigation menu of left with CSS or PHP or ??

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • H.S.

    navigation menu of left with CSS or PHP or ??


    Hi,

    Let me begin by saying that I am not an HTML expert. The most experience
    I have for HTML authoring is when I made my webpages in my grad studies
    at my university and some on my home computer for experiments. I am
    however familiar with programming languages and am quite familiar with
    Linux (use Debian Testing).

    I am in the process of revamping my old old old webpage. I have decided
    not to use frames for now and try to made do without them.

    So far I have figured I have the choice of pure CSS or PHP with CSS to
    make a navigation menu (usually on the left hand side of the webpage).
    With PHP, I can make only one nagivation menu php file and include it in
    all 'content' pages. With pure CSS method, I would need to keep a copy
    of the CSS based menu in all the webpages.

    In PHP approach, it appears I can't use an HTML editor on Linux. And in
    CSS, the problem is of maintianability , once slight change in the
    content may lead to a change in all HTML files which have CSS menu in
    them. So which one would be better from ease of coding and
    maintainability point of view? What do others use? Are there any other
    methods? If possible, I would want to stay clear of Javascript and cgi
    scripting.

    Hope I have made my point clear, if not, I can explain further.

    Thanks,
    ->HS
    --
    Please remove the underscores ( the '_' symbols) from my email address
    to obtain the correct one. Apologies, but the fudging is to remove spam.
  • Chris Morris

    #2
    Re: navigation menu of left with CSS or PHP or ??

    "H.S." <g_reate_xcalib ur@yahoo.com> writes:[color=blue]
    > however familiar with programming languages and am quite familiar with
    > Linux (use Debian Testing).
    >
    > In PHP approach, it appears I can't use an HTML editor on Linux. And in[/color]

    Please elaborate. I do a lot of PHP and HTML editing using emacs or vi
    on Linux. If you use emacs, you could install the php-elisp package
    and the html-helper-mode package. apt-cache also suggests august,
    bluefish, gnotepad+, or gphpedit as options.
    [color=blue]
    > them. So which one would be better from ease of coding and
    > maintainability point of view?[/color]

    Using some sort of templating system to generate the common blocks is
    certainly better than not doing so.

    PHP has cacheability issues, though (see group archives) and you might
    be better using a HTML preprocessor if all you want to use scripting
    for is to make page generation easier.
    [color=blue]
    > What do others use? Are there any other methods? If possible, I
    > would want to stay clear of Javascript and cgi scripting.[/color]

    Preprocessing works quite well. apt-cache suggests wpp, gpp, hitop, or
    write your own (for what you're doing, make+cat would be a perfectly usable
    preprocessor).

    --
    Chris

    Comment

    • Jim Moe

      #3
      Re: navigation menu of left with CSS or PHP or ??

      H.S. wrote:[color=blue]
      >
      > So far I have figured I have the choice of pure CSS or PHP with CSS to
      > make a navigation menu (usually on the left hand side of the webpage).
      > With PHP, I can make only one nagivation menu php file and include it in
      > all 'content' pages. With pure CSS method, I would need to keep a copy
      > of the CSS based menu in all the webpages.
      >[/color]
      You seem confused what PHP and CSS are. PHP is a preprocessor for
      hypertext; CSS implements styles for HTML. They are completely separate
      entities, related only by being used on websites.
      I can highly recommend the PHP approach. I started using PHP after the
      third time I made a change to a header or menu and had to edit dozens of
      files to implement the change. I have never looked back.
      Learning a new editor is a small price for the advantages of a
      preprocessor.

      --
      jmm dash list (at) sohnen-moe (dot) com
      (Remove .AXSPAMGN for email)

      Comment

      • H.S.

        #4
        Re: navigation menu of left with CSS or PHP or ??

        Apparently, _Jim Moe_, on 26/08/05 12:38,typed:[color=blue][color=green]
        >> So far I have figured I have the choice of pure CSS or PHP with CSS to
        >> make a navigation menu (usually on the left hand side of the webpage).
        >> With PHP, I can make only one nagivation menu php file and include it in
        >> all 'content' pages. With pure CSS method, I would need to keep a copy
        >> of the CSS based menu in all the webpages.
        >>[/color]
        > You seem confused what PHP and CSS are. PHP is a preprocessor for[/color]

        No I am not.
        [color=blue]
        > hypertext; CSS implements styles for HTML. They are completely separate
        > entities, related only by being used on websites.[/color]

        But perhaps I did not explain fully: I want to have a non-frames based
        nagivation on the left hand side of my webpage, I see that (among other
        methods) either I need to use a style sheet based navigation (I called
        these purely CSS based) or use PHP include statement to include the HTML
        code for the menu from a differnet file(which I called the PHP based
        approach -- of course it would include CSS bases styling). In other
        words, the underlying purpose of my query was how to make menus, using
        plain CSS and div's or by using PHP as well?

        [color=blue]
        > I can highly recommend the PHP approach. I started using PHP after the
        > third time I made a change to a header or menu and had to edit dozens of
        > files to implement the change. I have never looked back.[/color]

        Yes, that is the problem I forsee. Only that I am yet to investigate if
        I can get a WYSIWYG editor (something like Mozilla Composer) that
        supports PHP.
        [color=blue]
        > Learning a new editor is a small price for the advantages of a
        > preprocessor.[/color]

        Learning the new editor is not a problem for me. But I am kind of
        shirking to learn the innards of HTML coding. With a WYSIWYG editor, I
        do not need to worry about most of the things and I can concentrate on
        fine tuning my CSS files to improve the appearance. I should look into
        such an editor which also supports scripts (php, javascript, etc).

        ->HS

        --
        Please remove the underscores ( the '_' symbols) from my email address
        to obtain the correct one. Apologies, but the fudging is to remove spam.

        Comment

        • kchayka

          #5
          Re: navigation menu of left with CSS or PHP or ??

          H.S. wrote:[color=blue]
          >
          > Learning the new editor is not a problem for me. But I am kind of
          > shirking to learn the innards of HTML coding.[/color]

          You shirk at learning HTML, yet you're up to coding PHP? That seems odd.

          I can't fathom how you propose to code PHP *without* knowing HTML,
          unless you're just using prefabricated scripts that plug-n-play, so to
          speak.

          If you want to test PHP rendering locally, you need to install a web
          server. An editor or browser won't do it alone.

          --
          Reply email address is a bottomless spam bucket.
          Please reply to the group so everyone can share.

          Comment

          • Jim Moe

            #6
            Re: navigation menu of left with CSS or PHP or ??

            H.S. wrote:[color=blue]
            >
            > [...] In other
            > words, the underlying purpose of my query was how to make menus, using
            > plain CSS and div's or by using PHP as well?
            >[/color]
            My method is to create a static version of a menu and work on it until
            I am satisfied with it. I then create a PHP function which emits that same
            code but with the possibility of zero or more options.
            For instance, I commonly display all of a set of menu options. The
            programmable part is where the link for the current page is disabled and
            has a different appearance. It also gives another bit of feedback to the
            user about where te is in the site. Statically this requires one file for
            each link in the menu. With PHP it is a single function.

            --
            jmm dash list (at) sohnen-moe (dot) com
            (Remove .AXSPAMGN for email)

            Comment

            • H.S.

              #7
              Re: navigation menu of left with CSS or PHP or ??

              Apparently, _kchayka_, on 26/08/05 13:48,typed:[color=blue]
              > H.S. wrote:
              >[color=green]
              >>Learning the new editor is not a problem for me. But I am kind of
              >>shirking to learn the innards of HTML coding.[/color]
              >
              >
              > You shirk at learning HTML, yet you're up to coding PHP? That seems odd.[/color]

              No it doesn't if you are clear on the context of my situation. Moreover
              I was not shirking, I was "kind of shirking". The story is that I needed
              to get a first version of a web page up and running. If a WYSIWYG editor
              could get stuff up for me and serve my purpose, that was all fine to me.
              To achieve this objective, I had to read up on CSS, I did; I had to
              starting learning PHP, I did. I did not need to extend my knowledge of
              core HTML coding so I didn't -- and just to put the record straight, it
              is not that I do not know HTML, only that I am not an advanced
              programmer. In this case, I will cross the bridge when I come to it.

              And also, I find it better to separate the matter from it's appearance.
              I find it easier and faster to use WYSIWYG and text based editors in a
              mixed fashion -- both have advantages over the other in certain situations.

              [color=blue]
              > I can't fathom how you propose to code PHP *without* knowing HTML,
              > unless you're just using prefabricated scripts that plug-n-play, so to
              > speak.[/color]

              Where did I say I do not intend to use HTML at all?

              [color=blue]
              > If you want to test PHP rendering locally, you need to install a web
              > server. An editor or browser won't do it alone.[/color]

              We have all this in our university. I have it all set up at home as
              well, Debian Sid. Thank you.
              ->HS



              --
              Please remove the underscores ( the '_' symbols) from my email address
              to obtain the correct one. Apologies, but the fudging is to remove spam.

              Comment

              • H.S.

                #8
                Re: navigation menu of left with CSS or PHP or ??

                Apparently, _Jim Moe_, on 26/08/05 20:13,typed:[color=blue]
                > H.S. wrote:
                >[color=green]
                >>
                >> [...] In other
                >> words, the underlying purpose of my query was how to make menus, using
                >> plain CSS and div's or by using PHP as well?
                >>[/color]
                > My method is to create a static version of a menu and work on it until
                > I am satisfied with it. I then create a PHP function which emits that
                > same code but with the possibility of zero or more options.
                > For instance, I commonly display all of a set of menu options. The
                > programmable part is where the link for the current page is disabled and
                > has a different appearance. It also gives another bit of feedback to the
                > user about where te is in the site. Statically this requires one file
                > for each link in the menu. With PHP it is a single function.
                >[/color]

                Yes, I have used this approach on a part of the website. I find this
                better than maintaining navigation menu code in each HTML file -- so
                far. I also have the purely CSS approach (without PHP) implemented as
                well for a groups of webpages. I am currently comparing how both
                approaches fair in case of modifications to the web pages.

                thanks,
                ->HS

                --
                Please remove the underscores ( the '_' symbols) from my email address
                to obtain the correct one. Apologies, but the fudging is to remove spam.

                Comment

                Working...