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

来源:互联网 发布:陈一发 知乎 编辑:程序博客网 时间:2024/05/14 20:13

模型对应的表名在这个表中: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 0
原创粉丝点击