473,397 Members | 2,056 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

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.
Aug 26 '05 #1
10 3075
"H.S." <g_**************@yahoo.com> writes:
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
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.
them. So which one would be better from ease of coding and
maintainability point of view?
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.
What do others use? Are there any other methods? If possible, I
would want to stay clear of Javascript and cgi scripting.


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
Aug 26 '05 #2
H.S. wrote:

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.

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)
Aug 26 '05 #3
[ciwas removed from the groups list, as this reply does not deal with
CSS topics]

On Fri, 26 Aug 2005 14:12:29 GMT, H.S. wrote:
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.
That's a good choice.
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.


There is another option that you've missed. SSI (server side includes)
would allow you to put your pure CSS menu in a separate file and have it
included into your HTML files via a special #include comment. This is
what I do on most of my sites, and it is very simple. The downside is
that there is a little bit of processing overhead required for every
page, as they need to be examined by the server and some replacement
done, but for not-very-busy sites it shouldn't cause a noticeable hit.

There will be a little bit of server configuration required to enable
SSI. It's all very well documented at the Apache site (I'm assuming
you're running Apache since you mentioned Linux), and on many other
sites as well.

--
Greg Schmidt gr***@trawna.com
Trawna Publications http://trawna.com/
Aug 26 '05 #4
Apparently, _Jim Moe_, on 26/08/05 12:38,typed:
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.
You seem confused what PHP and CSS are. PHP is a preprocessor for


No I am not.
hypertext; CSS implements styles for HTML. They are completely separate
entities, related only by being used on websites.
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?

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.
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.
Learning a new editor is a small price for the advantages of a
preprocessor.


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.
Aug 26 '05 #5
H.S. wrote:

Learning the new editor is not a problem for me. But I am kind of
shirking to learn the innards of HTML coding.


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.
Aug 26 '05 #6
H.S. wrote:

[...] 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?

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)
Aug 27 '05 #7
Apparently, _kchayka_, on 26/08/05 13:48,typed:
H.S. wrote:
Learning the new editor is not a problem for me. But I am kind of
shirking to learn the innards of HTML coding.

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


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.

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.
Where did I say I do not intend to use HTML at all?

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


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.
Aug 29 '05 #8
Apparently, _Jim Moe_, on 26/08/05 20:13,typed:
H.S. wrote:

[...] 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?

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.


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.
Aug 29 '05 #9
Apparently, _Greg Schmidt_, on 26/08/05 12:51,typed:
[ciwas removed from the groups list, as this reply does not deal with
CSS topics]
Thanks.
<SNIP>
There is another option that you've missed. SSI (server side includes)
would allow you to put your pure CSS menu in a separate file and have it
included into your HTML files via a special #include comment. This is
what I do on most of my sites, and it is very simple. The downside is
that there is a little bit of processing overhead required for every
page, as they need to be examined by the server and some replacement
done, but for not-very-busy sites it shouldn't cause a noticeable hit.
This seems very interesting. I am going to try out this approach this week.
There will be a little bit of server configuration required to enable
SSI. It's all very well documented at the Apache site (I'm assuming
you're running Apache since you mentioned Linux), and on many other
sites as well.


Yes, you are correct.

thanks a ton,
->HS
--
Please remove the underscores ( the '_' symbols) from my email address
to obtain the correct one. Apologies, but the fudging is to remove spam.
Aug 29 '05 #10
Dear H.S.

I have a similar problem to you. I have about 50 pages requiring menu on the left. One way (the one I have used) is to break up the page into frames and have menu in the left frame and information on the right frame. But that does not look good.
Having seen your message posted and the replies to it by you and others, I think you do have some solution. Can you mail me the scripts and the pages for both methods - CSS & PHP?
Would PHP bsaed scripts require Linux or is it implementable on Windows servers also?
I would be very grateful if you provide me details and sample pages as I am in urgent need of the same.
One more request is to mail me at: smbhatt@yahoo.com. I am from India, Gujarat state and am trying to earn by developing websites for people in this region.
Thanks for your help.
S.M.Bhatt
Sep 16 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Vincent | last post by:
First, here is a page to help you figure out what I'm talking about: http://relinquiere.free.fr/test.html As you can see in the source of this page, the structure is the following : - a banner...
22
by: Marek Mand | last post by:
How to create a functional *flexible* UL-menu list <div> <ul> <li><a href=""></li> <li><a href=""></li> <li><a href=""></li> </ul> </div> (working in IE, Mozilla1.6, Opera7 (or maybe even...
1
by: Bryan | last post by:
I've been trying to figure out how to do this for the past 2 days and am finally tossing in the towel. No matter what I do, I just can't seem to get it to work and haven't been able to find any...
3
by: eternalD3 | last post by:
Hi, I have a problem to get this working on Opera 7.x+. This does not need to work on older Opera browsers There are problems on rendering the sub-level navigation. It aligns right on Firefox...
7
by: H.S. | last post by:
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...
10
by: EA | last post by:
I am sure I must be missing something about building navigation bars with CSS. Yes it is a very clever and efficient way to format navigation structures on simple one navigation level webs, i.e....
6
by: nishac | last post by:
Can anyone suggest me how to make my drop down menu work in IE7 too.Its working in other browsers.On mouse over the submenus should be displayed.Am attaching my css code hereby.Anyone please check...
4
by: tburger | last post by:
Hey everyone- This is my first post at The Scripts, but I've used the forums before for other programming issues. Hopefully, someone has some solid styling advice for me. I've now been dealing...
2
tharden3
by: tharden3 | last post by:
I have a question for you guys, I'm designing a website. Before I go any further, I'd like to get my navigation bars on the left side up and running. The site is themed to a bumblebee 'black and...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.