yiyou eyoucms according to aid get the document page link
use sql the following method can be used to obtain the document information, but no link to the document page is obtained.
1、in the root directory \extend\function.php create method in:
if (!function_exists('diy_get_arcurl'))
{
/**
* get the foreground document URL
* @param integer $aid document ID
* @param integer $typeid column ID
* @return [type] [description]
*/
function diy_get_arcurl($aid = 0, $typeid = 0){
$url = '';
if (!empty($aid)) {
static $arctypeList = null;
if (null === $arctypeList) {
$arctypeList = \think\Db::name('arctype')->order('id asc')->getAllWithIndex('id');
}
$row = !empty($arctypeList[$typeid]) ? $arctypeList[$typeid] : [];
if (!empty($row)) {
$row['aid'] = $aid;
$url = arcurl('home/View/index', $row);
}
}
return $url;
}
}
2、call the method where you need to use the document link:
{$field.aid|diy_get_arcurl=###,$field.typeid}

the above is "yiyou" shared by suyou network with everyone eyoucms according to aid get link to the document page", thank you very much for your patience to read this article. we will provide you with more information on reference or learning communication. we can also provide you with:enterprise website construction, website imitation, website copying, imitation site, foreign trade website construction, foreign trade website construction, company official website productionfor services, our company serves customers with the service concept of "integrity, professionalism, pragmatism and innovation". if you need cooperation, please scan the code to consult, and we will serve you sincerely.
TAG label:yiyou cms