问题复现

当内容设置为生成静态,前台或者后台发布内容后自动生成静态,show模板里使用{$url}调用url和{$updatetime}调用更新时间,会发现值是空的!

解决方法

/phpcms/model/content_model.class.php 141行左右找到

$urls['data']['system']['id'] = $id;

在其下面增加

$urls['data']['system']['thumb'] = $systeminfo['thumb'];$urls['data']['system']['updatetime'] = $systeminfo['updatetime'];$urls['data']['system']['url'] = $urls[0];

/phpcms/modules/content/classes/html.class.php里面找到show方法65行左右的

$output_data = $content_output->get($data);

在其下面增加:

$output_data['updatetime'] = SYS_TIME;

这样就解决了这个问题了!

本文转载自周涛的博客:https://www.zhoutao.org/blog/2022/06/5772.html

点赞(0) 打赏

Comment list 共有 0 条评论

暂无评论
立即
投稿
发表
评论
返回
顶部