Basically, the link address in the template category.
Achieve this kind of like
<a href= "/index.php/home/category/assortment/cateid/2.html" > Mobile wallpaper </a>
Problem:
The problem you started with is that you can't parse
{$category. ID} seems to be the result of parsing the outside U function {} should use $category["id"]
<volist name= "Cate" id= "category" > <span><a href= "{: U (' category/assortment?cateid={$ Category. ID} ')} ">{$category.categroyname}</a></span> </volist>
<volist name= "Cate" id= "category" ><span><a href= "{: U (' category/assortment?cateid=$category [' id '] ')} ">{$category.categroyname}</a></span></volist>
But it's still an error.
First error:
:(
Syntax error, unexpected ' "]),?>" ' (t_constant_encapsed_string), expecting ', ' or '; '
Wrong location
file:d:\wamp\www\apps\runtime\cache\home\04413e880c54d4e5faa7054dbe0160f3.php line:226
ThinkPHP3.2.3 {Fast & simple OOP PHP Framework}--[WE CAN do IT JUST THINK]
A second error
PHP Parse error:syntax error, unexpected ' id ' (t_string) in D:\www\apps\Runtime\Cache\Home\ 04413e880c54d4e5faa7054dbe0160f3.php on line 227
Solution directly with the U function to pass the parameter
The following can be used as normal parsing
<volist name= "Cate" id= "category" > <span><a href={:u (' category/assortment ',array(' Cateid ' =$category["id]])} >{$category.categroyname}</a></span> </ Volist>
When a href uses "", there will be an error, but it can also parse correctly
<span><a href= "{: U (' category/assortment ', Array (' cateid ' = ' $category [" id "])}" >{$ Category.categroyname}</a></span>
Do not know this is not standard can not
The use U function method of a tag href band parameter in thinkphp template