该问题已被锁定!
2
关注
2719
浏览

wecenter的首页无法独立描述吗?

AI智能回复搜索中,请稍后...

为什么被折叠? 0 个回复被折叠
空白丶 初级会员 用户来自于: 广东省深圳市
2017-01-10 21:47
你可以自己在header模版文件里加seo判断语句,或者只能自己添加一个seo程序插件 我新接触wecenter就是自己加的判断语句。
 if (!$_GET['app'] OR $_GET['app'] == 'explore') {  //判断首页
echo '首页关键字';
 }else if ($_GET['app'] == 'question') {  //判断问答列表页
    if( $this->question_info['question_content']<>"" ){  //判断问答内容页
   echo $this->question_info['question_content'];
          foreach($this->question_topics as $key => $val) { //输出内容页话题
          echo '_'.$val['topic_title'].'资源'; 
         } 
   echo '问答内容页关键字'; 
    
    }else{
   echo '问答列表页关键字';
    }
 }else if ($_GET['app'] == 'topic'){  //判断话题首页
        if($this->topic_info['topic_id']<>""){  //判断单独话题列表页
   echo $this->topic_info['topic_title'].'相关资源'; 
        }else{
   echo '话题列表关键字'; 
        }
  }else{
 echo $this->page_title; //其他页面
 }
  接触不多也就在模版里自己加了if判断输出,后期再弄到后台插件里吧。  你也可以试试,只做参考吧。   给你几个判断语句
if ($_GET['app'] == 'home') {  }  //_e('判断动态页');
if (!$_GET['app'] OR $_GET['app'] == 'explore') {  }  //_e('判断发现页')
if ($_GET['app'] == 'question') {  }  //_e('判断问题列表');
if ($_GET['app'] == 'article') {  }  //_e('判断文章页');
if ($_GET['app'] == 'topic') {  }  //_e('判断话题页'); 
if ($this->user_id) { } //$this->user_info['user_name'];判断用户
if( $this->topic_info){ } //$this->topic_info['topic_title'];判断单一话题列表页输出标题
if( $this->question_info){ } //$this->question_info['question_content'];判断问答内容页输出标题
if( $this->question_topics){ } //判断问答话题  下面是循环输出单个问答的话题
foreach($this->question_topics as $key => $val) { echo '_'.$val['topic_title'].'问答话题';} 
if( $this->article_info) { } //$this->article_info['title']判断文章内容页输出标题
if( $this->article_topics) { } //判断文章话题  下面是循环输出单个文章的话题
foreach($this->article_topics as $key => $val) {  $val['topic_title'].'文章话题'; }
 
if ($this->article_info['user_info']['user_name'] <>"")  //文章发布人
echo ','.$this->article_info['user_info']['user_name'].'会员,';
if ($this->question_info['user_info']['user_name'] <>"")  //问题发布人 
echo ','.$this->question_info['user_info']['user_name'].'会员,';
 

问题动态

发布时间
2017-01-10 10:33
更新时间
2017-01-10 21:47
关注人数
2 人关注

相关问题

【3.31新模板】WeCenter仿知乎模板正式上架,欢迎下载
有用户反映,手机版访问,UC浏览器,无法登录?
已经购买wecenter授权并在社区没有通过认证的用户请提交认证请求并pm我。
WeCenter用了哪些框架和插件?Zend Framework, JQuery, BootStrap?
点击登陆后立即丢失,跳转到首页?
手机版通过微信的内置浏览器无法登陆。
网站首页title独立修改问题
WeCenter免费吗的
wecenter有商城吗
手机版BUG,用户页面,翻页无法显示

推荐内容

能否让用户自己选择话题,而不是自己添加?
有意聘请二次开发合作伙伴,感兴趣的请联系本人615488888@qq.com.
升级到3.3.3后,无法用wangEditor?
管理,你好!请问下文章内容审核机制是在哪个文件下?
WeCenter 2.5 Beta 1 发布 居然不支持升级!
WeCenter社交化问答系统V3.6.1版本发布
哇 换域名了wecenter 有高人指点啊
建议改进:优化邮件验证流程!
Wecenter2.5.0 出现上传图片错误,如何解决
关注话题的功能建议