
Makyntosh
Gamma
Verificado por Whatsapp
¡Usuario con pocos negocios! ¡Utiliza siempre saldo de Forobeta!
Tengo una web hecha con ZOO, pero algo tan necesario no viene por defecto de fabrica.
Necesito mostrar los contenidos de mi subcategoria o categoria hijo en la categoria padre...
En este momento se muestra:
Categoria
------Subcategoria 1
--------------------Item 1
--------------------Item 2
--------------------Item 3
------Subcategoria 2
--------------------Item 4
--------------------Item 5
--------------------Item 6
Y quisiera que se mostrara:
Categoria
--------------------Item 1
--------------------Item 2
--------------------Item 3
--------------------Item 4
--------------------Item 5
--------------------Item 6
------Subcategoria 1
--------------------Item 1
--------------------Item 2
--------------------Item 3
------Subcategoria 2
--------------------Item 4
--------------------Item 5
--------------------Item 6
Seguramente debo de modificar algo de _category.php
O de category.php
Gracias de antemano...
Necesito mostrar los contenidos de mi subcategoria o categoria hijo en la categoria padre...
En este momento se muestra:
Categoria
------Subcategoria 1
--------------------Item 1
--------------------Item 2
--------------------Item 3
------Subcategoria 2
--------------------Item 4
--------------------Item 5
--------------------Item 6
Y quisiera que se mostrara:
Categoria
--------------------Item 1
--------------------Item 2
--------------------Item 3
--------------------Item 4
--------------------Item 5
--------------------Item 6
------Subcategoria 1
--------------------Item 1
--------------------Item 2
--------------------Item 3
------Subcategoria 2
--------------------Item 4
--------------------Item 5
--------------------Item 6
Seguramente debo de modificar algo de _category.php
Insertar CODE, HTML o PHP:
<?php
/**
* @package com_zoo
* @author YOOtheme http://www.yootheme.com
* @copyright Copyright (C) YOOtheme GmbH
* @license http://www.gnu.org/licenses/gpl.html GNU/GPL
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
?>
<div class="category">
<?php if ($category) : ?>
<?php $link = $this->app->route->category($category); ?>
<?php if ($this->params->get('template.show_categories_titles')) : ?>
<h2 class="title">
<a href="<?php echo $link; ?>" title="<?php echo $category->name; ?>"><?php echo $category->name; ?></a>
<?php if ($this->params->get('template.show_categories_item_count')) : ?>
<span>(<?php echo $category->totalItemCount(); ?>)</span>
<?php endif; ?>
</h2>
<?php endif; ?>
<?php if ($this->params->get('template.show_categories_descriptions') && $category->getParams()->get('content.teaser_description')) : ?>
<div class="description"><?php echo $category->getParams()->get('content.teaser_description'); ?></div>
<?php endif; ?>
<?php if (($image = $category->getImage('content.teaser_image')) && $this->params->get('template.show_categories_images')) : ?>
<a class="teaser-image" href="<?php echo $link; ?>" title="<?php echo $category->name; ?>">
<img src="<?php echo $image['src']; ?>" title="<?php echo $category->name; ?>" alt="<?php echo $category->name; ?>" <?php echo $image['width_height']; ?>/>
</a>
<?php endif; ?>
<?php if ($this->params->get('template.show_sub_categories') && $category->getChildren()): ?>
<ul class="sub-categories">
<?php
foreach ($category->getChildren() as $child) {
if (!$child->totalItemCount() && !$this->params->get('config.show_empty_categories', false)) continue;
$link = $this->app->route->category($child);
$item_count = ($this->params->get('template.show_sub_categories_item_count')) ? ' <span>('.$child->totalItemCount().')</span>' : '';
echo '<li><a href="'.$link.'" title="'.$child->name.'">'.$child->name.'</a>'.$item_count.'</li>';
}
?>
</ul>
<?php endif; ?>
<?php endif; ?>
</div>
O de category.php
Insertar CODE, HTML o PHP:
<?php
/**
* @package com_zoo
* @author YOOtheme http://www.yootheme.com
* @copyright Copyright (C) YOOtheme GmbH
* @license http://www.gnu.org/licenses/gpl.html GNU/GPL
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
// include assets css/js
if (strtolower(substr($GLOBALS['app']->getTemplate(), 0, 3)) != 'yoo') {
$this->app->document->addStylesheet('assets:css/reset.css');
}
$this->app->document->addStylesheet($this->template->resource.'assets/css/zoo.css');
// show description only if it has content
if (!$this->category->description) {
$this->params->set('template.show_description', 0);
}
// show image only if an image is selected
if (!($image = $this->category->getImage('content.image'))) {
$this->params->set('template.show_image', 0);
}
$css_class = $this->application->getGroup().'-'.$this->template->name;
?>
<div id="yoo-zoo" class="yoo-zoo <?php echo $css_class; ?> <?php echo $css_class.'-'.$this->category->alias; ?>">
<?php if ($this->params->get('template.show_alpha_index')) : ?>
<?php echo $this->partial('alphaindex'); ?>
<?php endif; ?>
<?php if ($this->params->get('template.show_title') || $this->params->get('template.show_description') || $this->params->get('template.show_image')) : ?>
<div class="details <?php echo 'alignment-'.$this->params->get('template.alignment'); ?>">
<?php if ($this->params->get('template.show_title')) : ?>
<h1 class="title"><?php echo $this->category->name; ?></h1>
<?php endif; ?>
<?php if ($this->params->get('template.show_description') || $this->params->get('template.show_image')) : ?>
<div class="description">
<?php if ($this->params->get('template.show_image')) : ?>
<img class="image" src="<?php echo $image['src']; ?>" title="<?php echo $this->category->name; ?>" alt="<?php echo $this->category->name; ?>" <?php echo $image['width_height']; ?>/>
<?php endif; ?>
<?php if ($this->params->get('template.show_description')) echo $this->category->getText($this->category->description); ?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php
// render categories
$has_categories = false;
if ($this->params->get('template.show_categories', true) && ($this->category->childrenHaveItems() || ($this->params->get('config.show_empty_categories', false) && !empty($this->selected_categories)))) {
$has_categories = true;
echo $this->partial('categories');
}
?>
<?php
// render items
if (count($this->items)) {
echo $this->partial('items', compact('has_categories'));
}
?>
</div>
Gracias de antemano...