Resolve Discuz Template Insertion Jvascript scripting issues (unexpected token <)

Source: Internet
Author: User

Problem Description:

Recently learning Discuz to make a focus map, add a template, let it display background push picture, where the module template to use the following code

<div class= "wrap" > <div id= "Slide-holder" > <div id= "Slide-runner" >[Loop]<a href= "{URL}" {target}> </a>            [/loop] <div id= "Slide-controls" > <p id= "slide-client" class= "text" ><strong></s trong><span></span></p> <p id= "Slide-desc" class= "text" ></p> < P id= "Slide-nav" ></p> </div> </div> </div><script type= "Text/javascript" > if (!window.slider) {var slider={}; } slider.data= [[loop] {"id": "Slide-img-{currentorder}",//the IMG tag ID in slide-runner corresponds to "client": "{T   Itle} "," desc ":" {Summary} "//Modify description here}, [/loop]]; </script></div>

The following error message will appear:

Workaround:

Solution: The problem is in the [Loop] tab, a template can only have one [loop], if you want to have the rest of [loop], we can use [LOOP1],[LOOP2] ... You can have up to 9 [loops], so change the code to:

1<div class= "Wrap" >2<div id= "Slide-holder" >3<div id= "Slide-runner" >4 [Loop]5<a href= "{URL}" {target}> </a>6[/loop]7<div id= "Slide-controls" >8<p id= "slide-client" class= "text" ><strong></strong><span></span></p>9<p id= "Slide-desc" class= "text" ></p>Ten<p id= "Slide-nav" ></p> One</div> A</div> -</div> - <script type= "Text/javascript" >15 if (!window.slider) {var slider={};17}18 = [ Loop1]{"id": "Slide-img-{currentorder}",//img tag ID in slide-runner corresponds to "Clien T ":" {title} "," desc ":" {Summary} "//Modify the description here},26 [/LOOP1]];28 </script>29 </ Div>

The problem will be solved

Resolve Discuz Template Insertion Jvascript scripting issues (unexpected token <)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.