phpcms更新所有栏目为生成HTML设置,内容页生成静态

模型对应的表名在这个表中:mx_model

UPDATE mx_category SET setting = REPLACE(setting, "'ishtml' => '0'", "'ishtml' => '1'"); 

UPDATE mx_category SET setting = REPLACE(setting, "'content_ishtml' => '0'", "'content_ishtml' => '1'"); 
注意比对,将不同的参数都替换过来。感觉这种保存数据的方法比较麻烦。。

array (
  'workflowid' => '',
  'ishtml' => '1',
  'content_ishtml' => '1',
  'create_to_html_root' => '0',
  'template_list' => 'default',
  'category_template' => '',
  'list_template' => 'list_product',
  'show_template' => 'show_product',
  'meta_title' => '',
  'meta_keywords' => '',
  'meta_description' => '',
  'presentpoint' => '1',
  'defaultchargepoint' => '0',
  'paytype' => '0',
  'repeatchargedays' => '1',
  'category_ruleid' => '6',
  'show_ruleid' => '16',
)



array (
  'workflowid' => '',
  'ishtml' => '1',
  'content_ishtml' => '1',
  'create_to_html_root' => '0',
  'template_list' => 'default',
  'category_template' => 'category',
  'list_template' => 'list',
  'show_template' => 'show',
  'meta_title' => '',
  'meta_keywords' => '',
  'meta_description' => '',
  'presentpoint' => '1',
  'defaultchargepoint' => '0',
  'paytype' => '0',
  'repeatchargedays' => '1',
  'category_ruleid' => '1',
  'show_ruleid' => '11',
)



好像这样就可以了。

如果还是不行的话,就把表mx_category的url字段都清空。再后台-》内容-》内容相关设置-》管理栏目-》更新栏目缓存,最后再更新下所有栏目就行了。

我是调试的这个文件\phpcms\modules\admin\category.php

edit()方法

或者 :

方法:private function repair(

                    //if($catid == 15 || $catid == 16){
                        //echo $url.'==========';
                    //}
                    //if($catid == 16) exit;



内容页生成静态,需要指定模板,如表:mx_news_data中的template字段

PHPCMS内容页模板是可以任意指定的,这点和DEDECMS不同,DEDECMS中内容模板是跟随栏目指定的。


注意更新链接:

    批量更新栏目页
    生成首页
    批量更新URL
    批量更新内容页




  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值