简体   繁体   English

如何更改Drupal视图HTML过滤器?

[英]How to change Drupal views HTML filter?

In default Drupal configuration Views module apply "Filtered HTML" filter to HTML code generated by "Rewrite the output of this field". 在默认的Drupal配置视图模块中,将“过滤的HTML”过滤器应用于“重写此字段的输出”生成的HTML代码。 For some reasons I need "Rewrite the output of this field" to generate the next code: 由于某些原因,我需要“重写此字段的输出”以生成下一个代码:

<a href="[token1]" style="background-image:url([token2])">[token3]</a>

How can I change "Filter HTML" filter to "Full HTML" filter for the current View? 如何将当前视图的“过滤HTML”过滤器更改为“完整HTML”过滤器?

Thanks. 谢谢。

I'm assuming Drupal 6 with Views 2. 我假设Drupal 6具有Views 2。

One option is to rewrite the theme template for that specific field in your view. 一种选择是重写视图中该特定字段的主题模板。 To find out what to name your template file, look at Theme: Information section under "Basic Settings" on the left hand menu of the view edit screen. 要找出命名模板文件的名称,请查看视图编辑屏幕左侧菜单上“基本设置”下的主题:信息部分。 Depending on the name you use you can be very specific so your template only overwrites this field for this view, or more vague so it can overwrite this type of field for any view you want to do this to. 根据您使用的名称,您可能会非常具体,因此您的模板只会覆盖此视图的此字段,或者更加模糊,因此它可以覆盖您要执行此操作的任何视图的此类型的字段。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM