用CSS或PHP左边的导航菜单或?? [英] navigation menu of left with CSS or PHP or ??

查看:117
本文介绍了用CSS或PHP左边的导航菜单或??的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述






首先让我说我不是HTML专家。最实际的经验

我用于HTML创作的时候是我在我的大学毕业研究中制作我的网页

在我的大学和一些在家用电脑上进行实验。我是

但熟悉编程语言并且非常熟悉

Linux(使用Debian测试版)。


我在改造旧旧旧网页的过程。我已经决定现在不要使用框架并尝试不使用框架。


到目前为止,我认为我可以选择纯CSS或者带CSS的PHP

制作导航菜单(通常位于网页的左侧)。

使用PHP,我只能制作一个nagivation菜单php文件并包含它在

所有''内容''页面。使用纯CSS方法,我需要在所有网页上保留一份基于CSS菜单的副本




在PHP方法中,似乎我可以在Linux上使用HTML编辑器。在

CSS中,问题是具有主要性,一旦

内容略有变化,可能会导致所有带有CSS菜单的HTML文件发生变化

他们。那么从易于编码和

可维护性的角度来看哪一个会更好?别人怎么用?还有其他的

方法吗?如果可能的话,我希望不要使用Javascript和cgi

脚本。


希望我已经说清楚了,如果没有,我可以进一步解释。


谢谢,

- > HS

-

请删除下划线(来自我的电子邮件地址的''_''符号)

来获取正确的符号。道歉,但捏造是要删除垃圾邮件。

解决方案

" H.S。" <克_ ************** @ yahoo.com>写道:

但熟悉编程语言,并且非常熟悉Linux(使用Debian测试)。

在PHP方法中,似乎我不能在Linux上使用HTML编辑器。并在


请详细说明。我在Linux上使用emacs或vi

进行了大量的PHP和HTML编辑。如果你使用emacs,你可以安装php-elisp软件包

和html-helper-mode软件包。 apt-cache也建议8月,

bluefish,gnotepad +或gphpedit作为选项。

他们。那么从易于编码和可维护性的角度来看哪一个会更好?


使用某种模板系统来生成公共块是

肯定比不这样做更好。


但PHP存在可缓存性问题(参见组存档),如果您只想使用脚本编写

来制作页面,那么您可能会更好地使用HTML预处理器更容易。

其他人使用什么?还有其他方法吗?如果可能的话,我希望不要使用Javascript和cgi脚本。




预处理工作得很好。 apt-cache建议用wpp,gpp,hitop或

自己编写(对于你正在做的事情,make + cat将是一个完全可用的

预处理器)。


-

Chris


HS写道:


到目前为止,我已经想到我可以选择纯CSS或带CSS的PHP来制作导航菜单(通常位于网页的左侧) 。
使用PHP,我只能创建一个nagivation菜单php文件并将其包含在
所有内容页面中。使用纯CSS方法,我需要在所有网页中保留基于CSS的菜单的副本。



你似乎对PHP和CSS的看法感到困惑。 PHP是

超文本的预处理器; CSS实现HTML的样式。它们是完全独立的b $ b实体,仅与在网站上使用有关。

我强烈推荐PHP方法。我开始使用PHP

第三次我对标题或菜单进行了更改,并且必须编辑几十个
文件来实现更改。我从来没有回头。

学习一个新编辑器对于

预处理器的优势来说是一个小小的代价。


- -

jmm dash list(at)sohnen-moe(dot)com

(删除电子邮件的.AXSPAMGN)


< blockquote> [ciwas从群组列表中删除,因为此回复不涉及

CSS主题]


星期五,2005年8月26日14:12: 29 GMT,HS写道:

我正在修改旧的旧旧网页。我已经决定暂时不使用框架,并尝试不使用框架。


这是一个不错的选择。

到目前为止,我认为我可以选择纯CSS或带CSS的PHP来制作一个导航菜单(通常在网页的左侧)。
使用PHP,我只能创建一个nagivation菜单php文件并将其包含在所有内容页面中。使用纯CSS方法,我需要在所有网页上保留基于CSS的菜单的副本。




还有另一个选项,你''我错过了。 SSI(服务器端包括)

允许您将纯CSS菜单放在单独的文件中,并通过特殊的#include注释将其包含在HTML文件中。这是我在大多数网站上所做的事情,而且非常简单。缺点是

每个

页面需要一些处理开销,因为它们需要由服务器检查并进行一些替换

已完成,但是对于非常繁忙的网站,它不应该引起明显的打击。


需要一些服务器配置才能启用

SSI。这一切都在Apache网站上有很好的文档记录(我假设你自己提到Linux后你运行的是
)以及其他许多内容

网站也是。


-

Greg Schmidt gr *** @ trawna.com

Trawna出版物 http://trawna.com/



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.

解决方案

"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


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)


[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/


这篇关于用CSS或PHP左边的导航菜单或??的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆