• customer service QQ:    WeChat: Contact number: 18613993467     

Yiyou Eyoucms according to aid How to generate a document page link

Suyou Network (10 years of experience), serves tens of thousands of companies, and has fixed transparent quotations.Domain name registration, hosting /One-stop service for server and website source code.A physical company, a professional team, worth choosing!Website building business: corporate website construction, company official website production, foreign trade website construction, website imitation, website copying, imitation site, foreign trade website construction, single-page customer service WeChat【 suyoufuwu】


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 unction.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 =  hinkDb::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 the method of generating links for document pages", thank you very much for your patience to read this article, we will provide you with more information on reference, use or learning and 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

National branch station

National branch station