This article mainly introduces the weaving Dream Dedeeims label can not be nested 2 kinds of solutions, that is, dede tag nested another Dede label can not resolve the problem of normal resolution method, the need for friends can refer to the following label:
The code is as follows:
{dede:list pagesize= ' 6′}<li><a href= "/plus/jobs.php?lang={dede:global.user_lang/}&jobid=[field:id/] ">[field:jobname/]</a></li>{/dede:list}
When running, found {dede:global.user_lang/} Incredibly intact was shown out without being parsed, I am very puzzled, so went to the online search on the dedecms can not Nest label solution, and finally found two solutions.
Programme one:
<!– before the label, first use JS to get the contents of the tag –><script type= "Text/javascript" >function Get_user_lang () { document.write ("{dede:global.user_lang/}");} </script>{dede:list pagesize= ' 6′}<!– then call the JS function in the tag to show the contents –><li><a href= "/plus/jobs.php?lang =<script type= "Text/javascript" >get_user_lang (); </script>&jobid=[field:id/] ">[field:jobname/ ]</a></li>{/dede:list}
Obviously, this approach is certainly not what I want, because the method is not only complex, and not easy to maintain, more importantly, I try to adhere to the behavior and structural separation of the habit contrary, and then search on the Internet, the results found a more convenient solution, that is, {dede:global.user_lang/} Change to [field:global.user_lang/].
Scenario Two:
{dede:list pagesize= ' 6′}<li><a href= '/plus/jobs.php?lang=[field:global.user_lang/]&jobid=[field:id/ ] ">[field:jobname/]</a></li>{/dede:list}
Dedecms template Download Address: www.php.cn/xiazai/code/dedecms
Is it very simple, the method is not only simple, but easy to maintain, but also in line with the good habits of structure and behavior separation, of course, the application of other labels or in the DEDECMS is also applicable.