dongyi4170 2014-10-06 15:39
浏览 85
已采纳

Joomla自定义类别博客

I'm working in my own template using Joomla 3.3 and I've created a custom category blog in my template

mytemplate\html\com_content\category

enter image description herenow I need to make another custom category template, like news.php or products.php.

enter image description here

what I need is to have multiple custom category blog in my template. and I can select from menu manger the type of category blog template.

enter image description here

How to accomplish this??

  • 写回答

2条回答 默认 最新

  • drutjkpsr67393592 2014-10-07 00:13
    关注

    I've solved this issue by a workaround.

    In mytemplate\html\com_content\category/blog.php

    I've added some conditional statements like;

    if($this->pageclass_sufx=='x')
    

    echo $this->loadTemplate('item');//which is acts as blog_item.php elseif($this->pageclass_sufx=='y') echo $this->loadTemplate('custom');//which is acts as blog_custom.php that I'vecreated

    And in menu manager for the category item I add page class suffex 'x' or 'y'

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 孟德尔随机化结果不一致
  • ¥15 深度学习残差模块模型
  • ¥20 两个不同Subnet的点对点连接
  • ¥50 怎么判断同步时序逻辑电路和异步时序逻辑电路
  • ¥15 差动电流二次谐波的含量Matlab计算
  • ¥15 Can/caned 总线错误问题,错误显示控制器要发1,结果总线检测到0
  • ¥15 C#如何调用串口数据
  • ¥15 MATLAB与单片机串口通信
  • ¥15 L76k模块的GPS的使用
  • ¥15 请帮我看一看数电项目如何设计