Home>Article>Backend Development> Steps to change the directory and links generated by the dedecms single-page module
This article mainly introduces the method of changing the generated directory and links of the dedecms single-page module. Friends who need it can refer to it.The first step is to modify the generated directory.
include\arc.sgpage.class.php
I believe most friends can do it here Modified by yourself..
$file name = $GLOBALS[‘cfg_base dir’].$GLOBALS[‘cfg_cmspath’].’/’.$this->Fields[‘filename’];
is here.
For example, what if we want to generate html instead of the website root directory?
Then we will modify it to
$filename = $GLOBALS[‘cfg_basedir’].$GLOBALS[‘cfg_cmspath’].’/html/’.$this->Fields[‘filename’];
It’s that simple.
The second step below. It is also the last step. It is to modify the link.
If you don’t need it, you can leave it unchanged.
include\taglib\likesgpage.lib.php
Modify
$row[‘url’] = $GLOBALS[‘cfg_cmsurl’].’/’.$row[‘filename’];
here to
$row[‘url’] = $GLOBALS[‘cfg_cmsurl’].’/html/’.$row[‘filename’];
Save and regenerate~~
dedecms template download address: m.sbmmt.com/xiazai/code/dedecms
The above is the detailed content of Steps to change the directory and links generated by the dedecms single-page module. For more information, please follow other related articles on the PHP Chinese website!