简体   繁体   English

模板中的语法错误-”-意外的“:”,应为以下其中之一:“}”

[英]Syntax error in template - ” - Unexpected “: “, expected one of: “}”

I wanted to embed a Javascript widget in the modules in TikiWiki. 我想在TikiWiki的模块中嵌入Javascript小部件。 In HTML widgets in all CMS, the JS code is accepted, but the Tiki reports Syntax Error. 在所有CMS的HTML窗口小部件中,都接受JS代码,但Tiki报告语法错误。

The code is so. 代码是这样。

<script type="text/javascript" data-more-link="https://jobs.internetblogger.de" data-per-page="10" src="https://jobs.internetblogger.de/content-widget.js" async data-hide-button data-css=".az-jobs-list {width: 105%; margin: auto;}" data-hide-location></script>

And the syntax error looks like this. 语法错误看起来像这样。

Syntax error in template “3b7535cb97b637bf9c01cddb0202d9db5b95b4f0” on line 1 “
” - Unexpected “: “, expected one of: “}”

How can I fix it, because normally the JS widget works in other open source CMS, forums, wikis and blogs. 我如何解决它,因为通常JS小部件可以在其他开源CMS,论坛,Wiki和博客中使用。

Thanks in advance. 提前致谢。

因为Smarty模板引擎使用花括号,所以包含它们的所有JS都必须包装在Tiki模块的{literal}...{/literal}块中。

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

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