phpcms v9 根据栏目id( catid ) 获取栏目名称

 phpcms v9 根据栏目id( catid ) 获取栏目名称、url等等 

调用方法:

{$CATEGORYS[栏目ID][catname]}

注意别掉了“S”。

以此类推,调用url:

{$CATEGORYS[栏目ID][url]}

 

除了url外,还有一些其它的属性也可以参考:

 

  array (
    "catid' => '26',
    'siteid' => '2',
    'type' => '0',
    'modelid' => '18',
    'parentid' => '24',
    'arrparentid' => '0,24',
    'child' => '0',
    'arrchildid' => '26',
    'catname' => '网络营销案例',
    'style' => '',
    'image' => '',
    'description' => '',
    'parentdir' => '/',
    'catdir' => 'wangluoyingxiao',
    'url' => 'http://www.zeroplace.cn/cms/index.php?m=content&c=index&a=lists&catid=26',
    'items' => '0',
    'hits' => '0',
    'setting' => 'array (
  \'workflowid\' => \'\',
  \'ishtml\' => \'0\',
  \'content_ishtml\' => \'0\',
  \'create_to_html_root\' => \'0\',
  \'template_list\' => \'site\',
  \'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\' => \'6\',
  \'show_ruleid\' => \'16\',
)',
    'listorder' => '26',
    'ismenu' => '1',
    'sethtml' => '0',
    'letter' => 'wangluoyingxiaoanli',
    'usable_type' => ',56,57,',
    'additional' => '',
    'commenttypeid' => '0',
    'create_to_html_root' => '0',
    'ishtml' => '0',
    'content_ishtml' => '0',
    'category_ruleid' => '6',
    'show_ruleid' => '16',
    'workflowid' => '',
    'isdomain' => '0',
  ),



[本日志由 admin 于 2014-03-04 07:40 PM 编辑]

有什么问题可以加群,100852896
点击这里加入此群 在线提问
文章来自: 本站原创
Tags: phpcms
评论: 0 | 查看次数: 3182
博主QQ: 友情链接请找我
QQ群: 灰色档案
返回顶部 关闭