In dedecms, the LOOP universal tag calls the arcurl tag (get link) and dedecmsarcurl cyclically. In dedecms, the LOOP universal tag calls the arcurl tag (get link) cyclically. in dedecmsarcurl, the loop universal LOOP tag is provided in DEDECMSV5.3, however, this LOOP tag can only LOOP out the LOOP universal tag in dedecms and call the arcurl tag (get link) and dedecmsarcurl.
The loop universal loop label is provided in DEDECMSV5.3, but this loop label can only loop out fields in the table, and the "[field: arcurl/]" link label cannot be parsed, the DEDECMS official forum did not find any related solutions, so I had to write the code myself!
This is the official code:
{Dede: loop table = 'dede _ archives 'sort = ''row = '4' if = ''}
[Field: title/]
{/Dede: loop}
Here are my solutions:
1. open Include/common. func. php and find 54 rows. add a function code as follows:
Function IDReturnURL ($ ID)
{
Global $ dsql;
$ Query = "Select arc. *, tp. typedir, tp. typename, tp. corank, tp. isdefault,
Tp. defaultname, tp. namerule, tp. moresite, tp. siteurl, tp. sitepath
From dede_archives arc left join dede_arctype tp on arc. typeid = tp. id where arc. id = ". $ ID;
$ Row = $ dsql-> GetOne ($ query );
$ ReturnURL = GetFileUrl ($ row ['id'], $ row ['typeid'], $ row ['senddate'], $ row ['title'], $ row ['ismake'],
$ Row ['arcrank '], $ row ['namerule'], $ row ['typedir'], $ row ['Money'], $ row ['filename'], $ row ['moresite '], $ row ['siteurl'], $ row ['sitepath']);
Return $ ReturnURL;
}
2. the method of calling in the template has also changed. the code is as follows:
{Dede: loop table = 'dede _ archives 'sort = ''row = '4' if = ''}
· [Field: title function = cn_substrR (@ me, 44)/]
{/Dede: loop}
The problem has been solved perfectly!
The same is true when you use custom SQL labels.
In fact, [field: id function = IDReturnURL (@ me)/] is used to replace the [field: arcurl/] tag. The core of my solution to this problem is [field: id function = IDReturnURL (@ me)/] and IDReturnURL!
In the SQL label
[Field: id runphp = 'yes'] $ arcRow = GetOneArchive (@ me); @ me = $ arcRow ['arcurl']; [/field: id]
You can also call it out.
The tag datalist in dedecms calls arcurl to point it to the content page
Href = do not use quotation marks
Zhimeng php code How does arcurl change the connection address?
[Field: arcurl/] This code indicates that when you call an article, you can call the corresponding link. if you change it to a link, all the articles are such links.
In includecms, the LOOP universal tag calls the arcurl tag (get link) cyclically. in dedecmsarcurl, the loop universal LOOP tag is provided in DEDECMSV5.3, but this loop tag can only be cyclically generated...