<legend id='XZ7Si'><style id='XZ7Si'><dir id='XZ7Si'><q id='XZ7Si'></q></dir></style></legend>
    <bdo id='XZ7Si'></bdo><ul id='XZ7Si'></ul>

<tfoot id='XZ7Si'></tfoot>

      <i id='XZ7Si'><tr id='XZ7Si'><dt id='XZ7Si'><q id='XZ7Si'><span id='XZ7Si'><b id='XZ7Si'><form id='XZ7Si'><ins id='XZ7Si'></ins><ul id='XZ7Si'></ul><sub id='XZ7Si'></sub></form><legend id='XZ7Si'></legend><bdo id='XZ7Si'><pre id='XZ7Si'><center id='XZ7Si'></center></pre></bdo></b><th id='XZ7Si'></th></span></q></dt></tr></i><div id='XZ7Si'><tfoot id='XZ7Si'></tfoot><dl id='XZ7Si'><fieldset id='XZ7Si'></fieldset></dl></div>

      <small id='XZ7Si'></small><noframes id='XZ7Si'>

      1. Joomla 2.5 中基于类别的文章的替代布局

        Alternative layout for article based on category in Joomla 2.5(Joomla 2.5 中基于类别的文章的替代布局)
        <legend id='bkysc'><style id='bkysc'><dir id='bkysc'><q id='bkysc'></q></dir></style></legend>
              <tbody id='bkysc'></tbody>
            1. <i id='bkysc'><tr id='bkysc'><dt id='bkysc'><q id='bkysc'><span id='bkysc'><b id='bkysc'><form id='bkysc'><ins id='bkysc'></ins><ul id='bkysc'></ul><sub id='bkysc'></sub></form><legend id='bkysc'></legend><bdo id='bkysc'><pre id='bkysc'><center id='bkysc'></center></pre></bdo></b><th id='bkysc'></th></span></q></dt></tr></i><div id='bkysc'><tfoot id='bkysc'></tfoot><dl id='bkysc'><fieldset id='bkysc'></fieldset></dl></div>

                  <bdo id='bkysc'></bdo><ul id='bkysc'></ul>

                  <small id='bkysc'></small><noframes id='bkysc'>

                  <tfoot id='bkysc'></tfoot>
                  本文介绍了Joomla 2.5 中基于类别的文章的替代布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我目前在 Joomla 2.5 安装中有 2 个文章布局"

                  I currently have 2 'layouts' for articles in my Joomla 2.5 install

                  default.php
                  default_links.php
                  feature_link.php
                  feature_link.php
                  

                  当在替代布局"下的文章管理器"的编辑文章"屏幕中选择每个时,它们会按预期工作.

                  which work as intended when each is selected in the 'Edit Article' screen of the 'Article Manager' under 'Alternative Layouts'.

                  但是,我希望某个类别中的文章使用一种布局自动显示,而所有其他文章使用另一种布局显示.

                  However, I'd like articles in a certain category to automatically display using one layout, and all other articles to display using the other.

                  我看到您可以在类别管理器"下选择替代布局",但这指定了com_content"的类别"视图中的布局(与该类别内文章的布局相反).

                  I see you can select 'Alternative Layout' under the 'Category Manager', but this specifies the layout in 'Category' view of 'com_content' (as opposed to the layout of the articles WITHIN that category).

                  在创建类别博客"菜单项时,我还查看了可用作参数的文章选项",但令人沮丧的是,您无法在此处覆盖或指定替代布局"——这似乎是最重要的明显的地方.

                  I've also taken a look through the 'Article Options' available as parameters when creating a 'Category Blog' menu item, however frustratingly you can't override or specify 'Alternative Layout' here - which would seem like the most obvious place.

                  TL;博士;- 我可以配置 Joomla 以根据该文章的类别设置文章级别的布局吗?

                  TL;DR; - can I configure Joomla to set article-level layout based on the category of that article ?

                  推荐答案

                  这是个好问题.也许您可以将默认布局设置为某种开关:将常规布局放在诸如 regular.php 之类的内容中,将特殊布局放入 like special.php 中,并让 default.php 发现文章属于哪个类别.然后包含相应布局文件的代码......只是一个想法.

                  Well thats a good question. Maybe you could make your default layout some kind of a switch: Put the regular layout in something like regular.php and the special in like special.php and have the default.php discover which category the article belongs to. Then include the code of the respective layout file... Just an idea.

                  像这样...

                  default.php:

                  default.php:

                  <?php 
                     ...
                     $specialCategory = 42; // the id of your special category
                     if($this->item->catid == $specialCategory){
                         include "special.php";
                     }else{
                         include "regular.php";
                     }
                  ?>
                  

                  请注意,到目前为止我还没有尝试过...

                  Please note that I did not try so far...

                  我刚刚在 com_users 登录视图中找到了这个:

                  I just found this in the com_users login view:

                  default.php

                  default.php

                  if ($this->user->get('guest')):
                  // The user is not logged in.
                  echo $this->loadTemplate('login');
                  else:
                  // The user is already logged in.
                  echo $this->loadTemplate('logout');
                  endif;
                  

                  tmp 文件夹中的文件名为 default.php、default_login.php 和 default_logout.php.

                  The files in the tmp folder are named default.php, default_login.php and default_logout.php.

                  这篇关于Joomla 2.5 中基于类别的文章的替代布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                    <i id='aiwtK'><tr id='aiwtK'><dt id='aiwtK'><q id='aiwtK'><span id='aiwtK'><b id='aiwtK'><form id='aiwtK'><ins id='aiwtK'></ins><ul id='aiwtK'></ul><sub id='aiwtK'></sub></form><legend id='aiwtK'></legend><bdo id='aiwtK'><pre id='aiwtK'><center id='aiwtK'></center></pre></bdo></b><th id='aiwtK'></th></span></q></dt></tr></i><div id='aiwtK'><tfoot id='aiwtK'></tfoot><dl id='aiwtK'><fieldset id='aiwtK'></fieldset></dl></div>

                      <tbody id='aiwtK'></tbody>
                      <legend id='aiwtK'><style id='aiwtK'><dir id='aiwtK'><q id='aiwtK'></q></dir></style></legend>

                        <bdo id='aiwtK'></bdo><ul id='aiwtK'></ul>

                        <tfoot id='aiwtK'></tfoot>

                          1. <small id='aiwtK'></small><noframes id='aiwtK'>