如何将静态页面编辑为动态页面
我正在开发一个网站,您可以从这里查看:www.wikima4.com
我想要多语言集成到网站中。右上角已经有一个链接,支持英语、德语和法语。
我的问题是,如果我单击这一列,第三列不会改变,它似乎是静态的。知道我怎样才能改变它吗?我在下面添加了代码,但是当我检查本地主机站点时,该列是在左侧创建的。您可以在此处查看图片: http://www.freeimagehosting.net/uploads/b828dee5e3.png
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
{{head}}
<body class="home">
{{skip-links}}
<div class="page_margins">
<div class="page">
{{header}}
{{main-nav}}
<!-- begin: main content area #main -->
<div id="main">
<!-- begin: #col2 second float column -->
<div id="col2">
<div id="col2_content" class="clearfix">
{{mesaforte-tour-button}}
{{news-box}}
{{events-box}}
{{articles-box}}
{{success-box}}
{{newsletter-box}}
</div>
</div>
<div id="col2">
<div id="col2_content" class="clearfix">
{{mesaforte-tour-button}}
{{news-box}}
</div>
</div>
<!-- end: #col2 -->
<!-- {{mainde-nav}}
<div id="mainde">-->
<!-- begin: #col3 static column -->
<div id="col3">
<div id="col3_content" class="clearfix">
<div id="home">
<div id="wikima4-home">
<p class="float_left"><a href="[~4~]">wikima4</a></p>
</div>
<div id="mesaforte-home">
<p class="float_right"><a href="[~5~]">mesaforte</a></p>
</div>
</div>
{{teaser-box}}
</div>
<!-- IE column clearing -->
<div id="ie_clearing"> </div>
</div>
<!-- end: #col3 -->
</div>
<!-- end: #main -->
{{footer}}
</div>
</div>
<!-- full skiplink functionality in webkit browsers -->
<script src="assets/templates/wikima4/yaml/core/js/webkit-focusfix.js" type="text/javascript"></script>
</body>
</html>
I'm developing a site you can check it from here: www.wikima4.com
I want to have the multilingual integrate in the site. There is already a link at the upper right corner, for English, German and French.
My problem is if I click this one, the 3rd column is not changing it seems it is static. Any idea how can i have it change as well? I added a code below but when I check the localhost site, that column is created on the left. You can check the picture here: http://www.freeimagehosting.net/uploads/b828dee5e3.png
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
{{head}}
<body class="home">
{{skip-links}}
<div class="page_margins">
<div class="page">
{{header}}
{{main-nav}}
<!-- begin: main content area #main -->
<div id="main">
<!-- begin: #col2 second float column -->
<div id="col2">
<div id="col2_content" class="clearfix">
{{mesaforte-tour-button}}
{{news-box}}
{{events-box}}
{{articles-box}}
{{success-box}}
{{newsletter-box}}
</div>
</div>
<div id="col2">
<div id="col2_content" class="clearfix">
{{mesaforte-tour-button}}
{{news-box}}
</div>
</div>
<!-- end: #col2 -->
<!-- {{mainde-nav}}
<div id="mainde">-->
<!-- begin: #col3 static column -->
<div id="col3">
<div id="col3_content" class="clearfix">
<div id="home">
<div id="wikima4-home">
<p class="float_left"><a href="[~4~]">wikima4</a></p>
</div>
<div id="mesaforte-home">
<p class="float_right"><a href="[~5~]">mesaforte</a></p>
</div>
</div>
{{teaser-box}}
</div>
<!-- IE column clearing -->
<div id="ie_clearing"> </div>
</div>
<!-- end: #col3 -->
</div>
<!-- end: #main -->
{{footer}}
</div>
</div>
<!-- full skiplink functionality in webkit browsers -->
<script src="assets/templates/wikima4/yaml/core/js/webkit-focusfix.js" type="text/javascript"></script>
</body>
</html>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
你真的不应该编写自己的“模板引擎”,因为 php 本身就是一个模板引擎。
只需将代码更改为不替换 html 中的字符串,而是使用 php 标签将动态数据放入 html 代码中。
you should really not write your own "template engine" as php is a tempalte engine itsself.
simply change your code to not replacing strings in html but use php tags to put your dynamic data into the html code.
您使用哪种技术?如果asp.net有资源文件,用于设置和获取数据。如果您使用数据库,您可以从数据库文本获取到网站中的输出。
您也可以使用 XML 文件,然后通过 jQuery 或 javascript 获取数据。
Which technology you use? if asp.net there have Resource files, for setting and getting data. if you use database, you can get from db text to output in your website.
Also you can use XML file, and then get data by jQuery or javascript.
关于制作多语言网站的 Modx 教程....也许它可以帮助添加一些上下文: http:// wiki.modxcms.com/index.php/Make_Multi_Lingual_Site
Modx tutorial on making multilingual sites....perhaps it can help add some context: http://wiki.modxcms.com/index.php/Make_Multi_Lingual_Site