【发布时间】:2012-07-30 21:45:04
【问题描述】:
我正在使用表达式引擎字段来发布使用<pre> 元素和[code] 标记的代码示例,但我也将此字段用作摘录。在摘录中,我想删除这些前置元素中的任何内容(或以某种方式停止,一旦它到达<pre> 元素。有人知道该怎么做吗?这是我的摘录代码:
<p class="excerpt">{exp:trunchtml chars="300"}{code_content}{/exp:trunchtml}</p>
这是一个包含代码的示例条目:
</p>Blah blah blah Lorem Ipsum</p> <pre>[code]camera.position.set(0,20,35); [/code]</pre>
【问题讨论】:
标签: php expressionengine truncate pre truncation