前端之家收集整理的这篇文章主要介绍了
织梦wap静态化,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
功能很久以前就做过一次,只是当时不想更改织梦数据库,所以不能给栏目设置单独的wap模板,现在给栏目表(dede__arctype)增加了3个字段,用于存储手机模板封面模板,列表页模板及内容页模板。
1.增加3个变量
生成目录 例如:3g (在网站根目录新建目录3g,用保存wap生成的页面)
PHPerhome.com ()
文件夹放在织梦模板目录templets下(和PC模板一样的道理)

栏目表增加3个字段,用于存储手机模板封面模板,列表页模板及内容页模板
后台系统-sql命令行工具 执行sql语句:
SyntaxHighlighter sql ke-zeroborder" style="font-family:Monaco,Menlo,Consolas,'Courier New',monospace;width:648px;word-break:break-all;word-wrap:break-word;color:#434343;border-radius:4px !important;border:1px solid #CCCCCC !important;bottom:auto !important;float:none !important;left:auto !important;line-height:1.1em !important;margin:0.3em 0px !important;outline:0px !important;overflow:auto !important;padding:0px !important;position:relative !important;right:auto !important;top:auto !important;vertical-align:baseline !important;Box-sizing:content-Box !important;min-height:inherit !important;font-size:13px !important;border-collapse:separate !important;background:none #F5F5F5 !important;">
Box-sizing:content-Box !important;min-height:inherit !important;background:none !important;">
Box-sizing:content-Box !important;min-height:inherit !important;background:none !important;">
Box-sizing:content-Box !important;min-height:inherit !important;font-size:13px !important;color:#AFAFAF !important;-webkit-user-select:none !important;background:none #F7F7F9 !important;">
Box-sizing:content- Box !important;min-height:inherit !important;white-space:pre !important;background:none !important;">
1
Box-sizing:content- Box !important;min-height:inherit !important;white-space:pre !important;background:none !important;">
2
Box-sizing:content- Box !important;min-height:inherit !important;white-space:pre !important;background:none !important;">
3
| Box-sizing:content-Box !important;min-height:inherit !important;font-size:13px !important;background:none !important;">
Box-sizing:content-
Box !important;min-height:inherit !important;background:none !important;">
Box-sizing:content-
Box !important;min-height:inherit !important;background:none !important;">
sql keyword" style="font-family:Monaco,monospace;border-radius:0px !important;border:0px !important;bottom:auto !important;float:none !important;left:auto !important;line-height:1.1em !important;margin:0px !important;outline:0px !important;overflow:visible !important;padding:0px !important;position:static !important;right:auto !important;top:auto !important;vertical-align:baseline !important;width:auto !important;Box-sizing:content-Box !important;font-weight:bold !important;min-height:inherit !important;color:#FF7800 !important;background:none !important;">alter
sql keyword" style="font-family:Monaco,monospace;border-radius:0px !important;border:0px !important;bottom:auto !important;float:none !important;left:auto !important;line-height:1.1em !important;margin:0px !important;outline:0px !important;overflow:visible !important;padding:0px !important;position:static !important;right:auto !important;top:auto !important;vertical-align:baseline !important;width:auto !important;Box-sizing:content-Box !important;font-weight:bold !important;min-height:inherit !important;color:#FF7800 !important;background:none !important;">table
sql plain" style="font-family:Monaco,monospace;border-radius:0px !important;border:0px !important;bottom:auto !important;float:none !important;left:auto !important;line-height:1.1em !important;margin:0px !important;outline:0px !important;overflow:visible !important;padding:0px !important;position:static !important;right:auto !important;top:auto !important;vertical-align:baseline !important;width:auto !important;Box-sizing:content-Box !important;min-height:inherit !important;color:black !important;background:none !important;">`#@_ _arctype`
sql keyword" style="font-family:Monaco,monospace;border-radius:0px !important;border:0px !important;bottom:auto !important;float:none !important;left:auto !important;line-height:1.1em !important;margin:0px !important;outline:0px !important;overflow:visible !important;padding:0px !important;position:static !important;right:auto !important;top:auto !important;vertical-align:baseline !important;width:auto !important;Box-sizing:content-Box !important;font-weight:bold !important;min-height:inherit !important;color:#FF7800 !important;background:none !important;">add
sql plain" style="font-family:Monaco,monospace;border-radius:0px !important;border:0px !important;bottom:auto !important;float:none !important;left:auto !important;line-height:1.1em !important;margin:0px !important;outline:0px !important;overflow:visible !important;padding:0px !important;position:static !important;right:auto !important;top:auto !important;vertical-align:baseline !important;width:auto !important;Box-sizing:content-Box !important;min-height:inherit !important;color:black !important;background:none !important;">`waptempindex`
sql keyword" style="font-family:Monaco,monospace;border-radius:0px !important;border:0px !important;bottom:auto !important;float:none !important;left:auto !important;line-height:1.1em !important;margin:0px !important;outline:0px !important;overflow:visible !important;padding:0px !important;position:static !important;right:auto !important;top:auto !important;vertical-align:baseline !important;width:auto !important;Box-sizing:content-Box !important;font-weight:bold !important;min-height:inherit !important;color:#FF7800 !important;background:none !important;">char
sql plain" style="font-family:Monaco,monospace;border-radius:0px !important;border:0px !important;bottom:auto !important;float:none !important;left:auto !important;line-height:1.1em !important;margin:0px !important;outline:0px !important;overflow:visible !important;padding:0px !important;position:static !important;right:auto !important;top:auto !important;vertical-align:baseline !important;width:auto !important;Box-sizing:content-Box !important;min-height:inherit !important;color:black !important;background:none !important;">(50)
sql color1" style="font-family:Monaco,monospace;border-radius:0px !important;border:0px !important;bottom:auto !important;float:none !important;left:auto !important;line-height:1.1em !important;margin:0px !important;outline:0px !important;overflow:visible !important;padding:0px !important;position:static !important;right:auto !important;top:auto !important;vertical-align:baseline !important;width:auto !important;Box-sizing:content-Box !important;min-height:inherit !important;color:gray !important;background:none !important;">NOT
sql color1" style="font-family:Monaco,monospace;border-radius:0px !important;border:0px !important;bottom:auto !important;float:none !important;left:auto !important;line-height:1.1em !important;margin:0px !important;outline:0px !important;overflow:visible !important;padding:0px !important;position:static !important;right:auto !important;top:auto !important;vertical-align:baseline !important;width:auto !important;Box-sizing:content-Box !important;min-height:inherit !important;color:gray !important;background:none !important;">NULL
sql keyword" style="font-family:Monaco,monospace;border-radius:0px !important;border:0px !important;bottom:auto !important;float:none !important;left:auto !important;line-height:1.1em !important;margin:0px !important;outline:0px !important;overflow:visible !important;padding:0px !important;position:static !important;right:auto !important;top:auto !important;vertical-align:baseline !important;width:auto !important;Box-sizing:content-Box !important;font-weight:bold !important;min-height:inherit !important;color:#FF7800 !important;background:none !important;">DEFAULT
sql string" style="font-family:Monaco,monospace;border-radius:0px !important;border:0px !important;bottom:auto !important;float:none !important;left:auto !important;line-height:1.1em !important;margin:0px !important;outline:0px !important;overflow:visible !important;padding:0px !important;position:static !important;right:auto !important;top:auto !important;vertical-align:baseline !important;width:auto !important;Box-sizing:content-Box !important;min-height:inherit !important;color:blue !important;background:none !important;">'waptpl/index_article_wap.htm'
sql plain" style="font-family:Monaco,monospace;border-radius:0px !important;border:0px !important;bottom:auto !important;float:none !important;left:auto !important;line-height:1.1em !important;margin:0px !important;outline:0px !important;overflow:visible !important;padding:0px !important;position:static !important;right:auto !important;top:auto !important;vertical-align:baseline !important;width:auto !important;Box-sizing:content-Box !important;min-height:inherit !important;color:black !important;background:none !important;">;
Box-sizing:content-
Box !important;min-height:inherit !important;background:none !important;">
sql keyword" style="font-family:Monaco,monospace;border-radius:0px !important;border:0px !important;bottom:auto !important;float:none !important;left:auto !important;line-height:1.1em !important;margin:0px !important;outline:0px !important;overflow:visible !important;padding:0px !important;position:static !important;right:auto !important;top:auto !important;vertical-align:baseline !important;width:auto !important;Box-sizing:content-Box !important;min-height:inherit !important;color:black !important;background:none !important;">`waptemplist`
sql keyword" style="font-family:Monaco,monospace;border-radius:0px !important;border:0px !important;bottom:auto !important;float:none !important;left:auto !important;line-height:1.1em !important;margin:0px !important;outline:0px !important;overflow:visible !important;padding:0px !important;position:static !important;right:auto !important;top:auto !important;vertical-align:baseline !important;width:auto !important;Box-sizing:content-Box !important;min-height:inherit !important;color:blue !important;background:none !important;">'waptpl/list_article_wap.htm'
sql plain" style="font-family:Monaco,monospace;border-radius:0px !important;border:0px !important;bottom:auto !important;float:none !important;left:auto !important;line-height:1.1em !important;margin:0px !important;outline:0px !important;overflow:visible !important;padding:0px !important;position:static !important;right:auto !important;top:auto !important;vertical-align:baseline !important;width:auto !important;Box-sizing:content-Box !important;min-height:inherit !important;color:black !important;background:none !important;">;
Box-sizing:content-
Box !important;min-height:inherit !important;background:none !important;">
sql keyword" style="font-family:Monaco,monospace;border-radius:0px !important;border:0px !important;bottom:auto !important;float:none !important;left:auto !important;line-height:1.1em !important;margin:0px !important;outline:0px !important;overflow:visible !important;padding:0px !important;position:static !important;right:auto !important;top:auto !important;vertical-align:baseline !important;width:auto !important;Box-sizing:content-Box !important;min-height:inherit !important;color:black !important;background:none !important;">`waptemparticle`
sql keyword" style="font-family:Monaco,monospace;border-radius:0px !important;border:0px !important;bottom:auto !important;float:none !important;left:auto !important;line-height:1.1em !important;margin:0px !important;outline:0px !important;overflow:visible !important;padding:0px !important;position:static !important;right:auto !important;top:auto !important;vertical-align:baseline !important;width:auto !important;Box-sizing:content-Box !important;min-height:inherit !important;color:blue !important;background:none !important;">'waptpl/article_article_wap.htm'
sql plain" style="font-family:Monaco,monospace;border-radius:0px !important;border:0px !important;bottom:auto !important;float:none !important;left:auto !important;line-height:1.1em !important;margin:0px !important;outline:0px !important;overflow:visible !important;padding:0px !important;position:static !important;right:auto !important;top:auto !important;vertical-align:baseline !important;width:auto !important;Box-sizing:content-Box !important;min-height:inherit !important;color:black !important;background:none !important;">;
后台不能运行,借助其他
数据库管理工具实现吧。

3.借助织梦的生成静态系统文件

生成wap版

文件里面更改一下模板就OK.
