Actions

Difference between revisions of "Override:No Numbers in Category List"

From Joomla! Documentation

(Create overrides category)
(Formatting improvements)
Line 1: Line 1:
To remove the numbers in a category list copy this file:
+
You may remove the numbers in a category list.
 +
===Copy the File===
 +
Copy the default_items.php file:
  
 +
''/components/com_content/views/category/tmpl/default_items.php''
  
\components\com_content\views\category\tmpl\default_items.php
+
to the the ''html'' folder of your template:
  
to the the html folder of your template.
+
''/templates/''<yourTemplate>''/html/com_content/category/default_items.php''
  
templates\yourTemplate\html\com_content\category\default_items.php
+
===Edit the Copied File===
  
 +
Delete or comment out line 43:
 +
<source lang="php">
 +
<?php echo JText::_('Num'); ?>
 +
</source >
  
Open the file.
+
If you still want an empty column where the numbers were, delete or comment out line 70:
 +
<source lang="php">
 +
<?php echo $this->pagination->getRowOffset( $item->count ); ?>
 +
</source >
  
Delete or comment out line 43
+
To eliminate the entire number column, delete or comment out lines 69 through 71:
<?php echo JText::_('Num'); ?>
+
<source lang="php">
+
<td align="right">
 
+
  <?php echo $this->pagination->getRowOffset( $item->count ); ?>
Delete or comment out line 70 if you still want an empty column where the numbers were
+
</td>
<?php echo $this->pagination->getRowOffset( $item->count ); ?>
+
</source >
 
+
Or lines 69-71 to eliminate the whole column
+
<pre>
+
<td align="right">
+
<?php echo $this->pagination->getRowOffset( $item->count ); ?>
+
</td>
+
</pre>
+
  
 
[[Category:Tips and tricks]]
 
[[Category:Tips and tricks]]
 
[[Category:Tips and tricks 1.5]]
 
[[Category:Tips and tricks 1.5]]
 
[[Category: Overrides]]
 
[[Category: Overrides]]

Revision as of 17:56, 5 March 2011

You may remove the numbers in a category list.

Copy the File

Copy the default_items.php file:

/components/com_content/views/category/tmpl/default_items.php

to the the html folder of your template:

/templates/<yourTemplate>/html/com_content/category/default_items.php

Edit the Copied File

Delete or comment out line 43:

<?php echo JText::_('Num'); ?>

If you still want an empty column where the numbers were, delete or comment out line 70:

<?php echo $this->pagination->getRowOffset( $item->count ); ?>

To eliminate the entire number column, delete or comment out lines 69 through 71:

<td align="right">
   <?php echo $this->pagination->getRowOffset( $item->count ); ?>
</td>