Remove "Display #" from product listing

  • Posts: 220
  • Thank you received: 12
3 years 8 months ago #333764

-- url of the page with the problem -- : www.dah01.jroot.layer3.co.uk/index.php/m...ting/product/listing
-- HikaShop version -- : 4.4.2
-- Joomla version -- : 3.9.22
-- PHP version -- : 5.6.40

Hello,

I am trying to remove "Display #" from product listings - please see attached image.

I would usually do display:none; in CSS but I'm using a screen reader on this website which still reads elements that are hidden in this way.

Thanks,
Josh

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 83403
  • Thank you received: 13497
  • MODERATOR
3 years 8 months ago #333768

Hi,

You can create a pagination override file in your template as explained here:
docs.joomla.org/Understanding_Output_Ove...tion_Links_Overrides
You'll want to implement the pagination_list_footer function to generate your own footer.
I think you can just have a

return '';
in that function to remove that area of the pagination.

The following user(s) said Thank You: joshualdouglas

Please Log in or Create an account to join the conversation.

  • Posts: 220
  • Thank you received: 12
3 years 8 months ago #333797

Hi,

I found that file but I'm not sure what to do with it.

Also if I remove this "Display # will it remove from pagination from articles?

See code below

<?php
/**
 * @package Helix Ultimate Framework
 * @author JoomShaper https://www.joomshaper.com
 * @copyright Copyright (c) 2010 - 2018 JoomShaper
 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
*/

defined ('_JEXEC') or die();

function pagination_list_render($list) {
	// Initialize variables
	$html = '<ul class="pagination">';

	if ($list['start']['active']==1)   $html .= $list['start']['data'];
	if ($list['previous']['active']==1) $html .= $list['previous']['data'];

	foreach ($list['pages'] as $page) {
		$html .= $page['data'];
	}

	if ($list['next']['active']==1) $html .= $list['next']['data'];
	if ($list['end']['active']==1)  $html .= $list['end']['data'];

	$html .= '</ul>';

	return $html;
}

function pagination_item_active(&$item) {

	$cls = '';

    if ($item->text == JText::_('Next')) { $item->text = '&raquo;'; $cls = "next";}
    if ($item->text == JText::_('Prev')) { $item->text = '&laquo;'; $cls = "previous";}

	if ($item->text == JText::_('First')) { $cls = "first";}
    if ($item->text == JText::_('Last'))   { $cls = "last";}

    return '<li class="page-item"><a class="page-link ' . $cls . '" href="' . $item->link . '" title="' . $item->text . '">' . $item->text . '</a></li>';
}

function pagination_item_inactive( &$item ) {
	$cls = (int)$item->text > 0 ? 'active': 'disabled';
	return '<li class="page-item ' . $cls . '"><a class="page-link">' . $item->text . '</a></li>';
}

Thanks,
Josh.

Please Log in or Create an account to join the conversation.

  • Posts: 83403
  • Thank you received: 13497
  • MODERATOR
3 years 8 months ago #333799

Hi,

You can try to add such code at the end of that file :

function pagination_list_footer ($list) {
 return '';
}
Now, rereading your messages, I'm not clear if you want to remove just the text before the dropdown, or whole area in your screenshot with the text before and after and the dropdown.
The solution above is to remove everything.
If you just want to remove the "Display #" text, then you can use a translation override of JGLOBAL_DISPLAY_NUM
www.joomla-monster.com/documentation/tem...in-joomla-3-template

The following user(s) said Thank You: joshualdouglas

Please Log in or Create an account to join the conversation.

  • Posts: 220
  • Thank you received: 12
3 years 8 months ago #333837

Hi Nicolas,

This is perfect. Thank you so much! I was trying to remove the whole area in the screenshot.

Thank you!

Please Log in or Create an account to join the conversation.

Time to create page: 0.063 seconds
Powered by Kunena Forum