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 <)