fastadmin开发手册

脚本样式替换标签


在CMS内容管理系统前台模板标签中有两个特殊标签{STYLE}{SCRIPT},这两个标签出现在addons/cms/view/default/common/layout.html布局模板中,它们的作用是将当前页模板中的:

``html


替换到{SCRIPT}位置

以及

html


替换到{STYLE}位置

例如我们的layout.html布局模板代码如下:

html



{STYLE}


{CONTENT}

{SCRIPT}



我们在show_news.html模板中有如下代码:
html


这是我们详情页正文



则生成的模板代码为:
html






这是我们详情页正文






`

可以看到中的代码已经被替换到head中了,而中的代码被替换到了body的最尾部。

注意{STYLE}{SCRIPT}`必须是大写,且前后都必须是空行。否则可能会导致替换失败。

10 Screens$8,029

I will design rough sketches for upto 5 Screens of your website/Mobile app.

3 Days Delivery 1 Revision
  • Source File
  • Commercial Use
  • Interactive Mockup
  • 10 Pages

20 Screens$16,029

I will design rough sketches for upto 5 Screens of your website/Mobile app.

3 Days Delivery
  • Source File
  • Commercial Use
  • Interactive Mockup
  • 10 Pages

30 Screens$24,029

I will design rough sketches for upto 5 Screens of your website/Mobile app.

3 Days Delivery
  • Source File
  • Commercial Use
  • Interactive Mockup
  • 10 Pages
0.833041s