首页 >

织梦DedeCMS 标签循环调用 去掉最后一个循环符号的代码

织梦标记允许有限的编程扩展。
格式为:
{dede:tagname runphp=’yes’}
$aaa = @me;
@me = “123456″;
{/dede:tagname}
@me 表示这个标记本身的值,因此标记内编程是不能使用echo之类的语句的,只能把所有返回值传递给@me。
此外由于程序代码占用了底层模板InnerText的内容,因此需编程的标记只能使用默认的InnerText。
当然,这里是[field:global name=autoindex/],但可以用以下的方式进行编程:
[field:global name=autoindex]
$aaa = @me; @me = “123456″;
[/field:global]
在这里只需要一个判断,代码如下:
[field:global name=autoindex runphp=”yes”]
(@me!=8)? @me=”|”:@me=””;
[/field:global]
意思就是当autoindex等于8时候这个标签为空,否则为”|”。
再总体看下这个代码:
{dede:arclist row=’8′ att=’3′ type=’p_w_picpath.’}
[field:litpic/]
[field:global name=autoindex runphp=”yes”]
(@me!=8)? @me=”|”:@me=””;
[/field:global]
{/dede:arclist}
这样就生成了想要形式的代码,很多FLASH都可以用这中样式解决了。
大伙可以下载附件中的东西再看看,哈哈。

  • Dede学习:织梦DedeCMS出现“Upload filetype not allow”的原
  • Dede学习:织梦DedeCMS出现“Upload filetype not allow”的原 | Dede学习:织梦DedeCMS出现“Upload filetype not allow”的原 ...

  • 织梦DedeCMS网站系统字符串内容截取函数
  • 织梦DedeCMS网站系统字符串内容截取函数 | 织梦DedeCMS网站系统字符串内容截取函数 ...

  • 织梦DedeCMS如何去除img图片中的style width height属性
  • 织梦DedeCMS如何去除img图片中的style width height属性 | 织梦DedeCMS如何去除img图片中的style width height属性 ...