Reputation: 178
I use for a menu-item the style "List All Categories".
I want to edit the code, however I cannot find this file anywhere!
I supposed it should be in components/com_content/views/category but no file I find there seems to be related to the html output.
This is an example of the HTML output:
<div class="categories-list">
<div class="category-item first">
<h3 class="page-header item-title"><a
href="/joomla/index.php/browse/8-eat-meet">
EAT&MEET</a>
</h3>
<img src="/joomla/images/cat1.jpg"/>
</div>
<div class="category-item">
<h3 class="page-header item-title"><a
href="/joomla/index.php/browse/9-dreaming">
DREAMING</a>
</h3>
<img src="/joomla/images/cat2.jpg"/>
</div>
Does anyone know where I can find this file?
Thank you.
Upvotes: 0
Views: 1511
Reputation: 6755
If it is the categorIES layout that you want that will be in the components/com_content/views/categories/tmpl
categories folder (I'm assuming you are talking about in the front end).
The layout files are in the tmpl folder.
In Joomla 3.2 you will find that these files reference the files layouts/content/categories_default.php
and layouts/content/categories_default_items.php
.
This is because the core layouts are the same for all categories (and they can be used by any component that uses categories).
You can override both the tmpl files and the layouts in the html folder of your template.
Update Here is the code block in the categories_default_items layout that produces the title, image and description HTML
<h3 class="page-header item-title">
<a href="<?php echo JRoute::_(ContentHelperRoute::getCategoryRoute($item->id));?>">
<?php echo $this->escape($item->title); ?></a>
<?php if ($this->params->get('show_cat_num_articles_cat') == 1) :?>
<span class="badge badge-info tip hasTooltip" title="<?php echo JHtml::tooltipText('COM_CONTENT_NUM_ITEMS'); ?>">
<?php echo $item->numitems; ?>
</span>
<?php endif; ?>
<?php if (count($item->getChildren()) > 0) : ?>
<a href="#category-<?php echo $item->id;?>" data-toggle="collapse" data-toggle="button" class="btn btn-mini pull-right"><span class="icon-plus"></span></a>
<?php endif;?>
</h3>
<?php if ($this->params->get('show_description_image') && $item->getParams()->get('image')) : ?>
<img src="<?php echo $item->getParams()->get('image'); ?>"/>
<?php endif; ?>
<?php if ($this->params->get('show_subcat_desc_cat') == 1) :?>
<?php if ($item->description) : ?>
<div class="category-desc">
<?php echo JHtml::_('content.prepare', $item->description, '', 'com_content.categories'); ?>
</div>
<?php endif; ?>
<?php endif; ?>
Upvotes: 1
Reputation: 1873
That's because categories are generally attached to existing extensions, the majority use case being articles. My assumption here is these are the categories you are referring to. If you selected the "List all categories" menu option from the Articles sub-group, then the assumption is correct. The path is:
components/com_content/views/categories/tmpl
If you would like to change these files, I HIGHLY recommend not editing the core files but using template overrides to customize. See link below for specifics.
http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core
Upvotes: 1