MovableType 4.0 默认模板的两个小修改

| No Comments | No TrackBacks

这些天把Blog程序升级到MovableType 4.0之后,就在不断的修改模板。昨天在测试W3C的HTML标准时,发现一个问题。
就是MovableType 4.0的默认模板的一个问题。
单篇文章归档中有个留言表单,其中有两个属性,name 和 ID,根据W3C的说法,这是相同的,需要保持一致。

NAME and ID are the old and the new name for the same attribute. If both are defined, they should be equal.

而在MT4.0的默认模板中是不同的,name="comments_form" id="comments-form"。
修改如下:
Design > Templates >
在右侧可以选择Template Modules
接着选择 Comment Form
在第十五行,找到上面的代码,修改为 name="comments-form" id="comments-form"
重建单篇归档后就可以了。

第二个问题,不是错误,而是看着不舒服,对用户不好。MovableType 4.0的Atom模板中默认的是文章不断行,那么在输出后,用户看到的就是一长串文字,没有段落,没有分行。
修改的方法如下:
Design > Templates >
接着选择Atom模板
在第三十,三十一行的地方,可以看到这样两行代码,
<$MTEntryBody encode_xml="1" convert_breaks="0"$>
<$MTEntryMore encode_xml="1" convert_breaks="0"$>

那么只要把convert_breaks="0" 这部分删掉,重建这个atom.xml文件就好了。
这样在Google Reader里看到的也不会有问题了。



作者: David Yin
原载: FreeThinking
版权所有。转载时必须以链接形式注明作者和及本声明。

No TrackBacks

TrackBack URL: http://www.yinfor.com/mtcgi/mt-t-1010.cgi/1798

Leave a comment

About this Entry

This page contains a single entry by David Yin published on 2007年8月30日 12:27.

老港正传 was the previous entry in this blog.

遐想 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Archives

Online Tools

Code Convertor
GeoURL
Listed on BlogShares