-
AuthorPosts
-
Luna Garden Moderator
Luna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
August 17, 2017 at 7:34 am #1056927Hi,
You could follow this post: https://www.joomlart.com/forums/topic/display-number-next-to-search-results/
Try and tell me the results.southsouthworld Friendsouthsouthworld
- Join date:
- April 2017
- Posts:
- 257
- Downloads:
- 15
- Uploads:
- 56
- Thanks:
- 14
- Thanked:
- 4 times in 4 posts
August 17, 2017 at 9:19 am #1056947Hi Luna,
Thanks for the code, however, I have two pages that used the JAk2 search filter, Home page called "Latest Solutions" and map page titled "Solutions around the world". When I use the code, the page titles are replaced with "Search Results". Could you help to only show the total number of searched items on the map page while keeping the original page titles?
Kindest regards,
AlyssaMo0nlight ModeratorMo0nlight
- Join date:
- September 2014
- Posts:
- 707
- Downloads:
- 38
- Uploads:
- 107
- Thanked:
- 99 times in 97 posts
August 18, 2017 at 4:32 am #1057095Hi.
You could try this.
Edit the file :
components/com_jak2filter/views/itemlist/view.html.phpLook for :
$total = count($items) ? $model->getTotal() : 0;
Add this under.
$params->set('_total', $total);
Then Edit the file :
components/com_k2/templates/{custome_template}/category.phpLook for:
<?php echo $this->escape($this->params->get('page_title')); ?>
Add this under.
<?php echo $this->params->get('_total'); ?>
How to make custom template.
Copy folder:
components/com_k2/templates/default/
To:
components/com_k2/templates/{Your_name}/Then in administrator menu edit choose "yourname" template
Look at attachment for refference
southsouthworld Friendsouthsouthworld
- Join date:
- April 2017
- Posts:
- 257
- Downloads:
- 15
- Uploads:
- 56
- Thanks:
- 14
- Thanked:
- 4 times in 4 posts
August 18, 2017 at 10:10 am #1057175Thank you very much will try it and let you know my results dear Luna!
southsouthworld Friendsouthsouthworld
- Join date:
- April 2017
- Posts:
- 257
- Downloads:
- 15
- Uploads:
- 56
- Thanks:
- 14
- Thanked:
- 4 times in 4 posts
August 21, 2017 at 1:01 pm #1057653I followed the steps Luna and it didnt work… 🙁
Luna Garden ModeratorLuna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
August 22, 2017 at 9:44 am #1057906southsouthworld Friendsouthsouthworld
- Join date:
- April 2017
- Posts:
- 257
- Downloads:
- 15
- Uploads:
- 56
- Thanks:
- 14
- Thanked:
- 4 times in 4 posts
August 23, 2017 at 12:52 am #1058006This reply has been marked as private.Luna Garden ModeratorLuna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
August 23, 2017 at 8:53 am #1058118Hi,
I just add code
<?php echo $this->params->get('_total'); ?>
in file below, line 22.
templates/ja_directory/html/com_k2/directory/category.php
and it works:
http://www.southsouthworld.org/map?isc=1&ordering=zelevance&category_id=0,8,31,50,62,63,75,76,88&xf_9%5B0%5D=2southsouthworld Friendsouthsouthworld
- Join date:
- April 2017
- Posts:
- 257
- Downloads:
- 15
- Uploads:
- 56
- Thanks:
- 14
- Thanked:
- 4 times in 4 posts
August 25, 2017 at 6:25 am #1058527Thank you Luna for getting it to work. Could you please kindly help to remove the total number on the home page for latest solutions? I did not want it to show on the home page.
Kindest regards,
AlyssaLuna Garden ModeratorLuna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
August 25, 2017 at 10:46 am #1058583southsouthworld Friendsouthsouthworld
- Join date:
- April 2017
- Posts:
- 257
- Downloads:
- 15
- Uploads:
- 56
- Thanks:
- 14
- Thanked:
- 4 times in 4 posts
August 28, 2017 at 7:00 am #1058865Thank you very much Luna!! 🙂
southsouthworld Friendsouthsouthworld
- Join date:
- April 2017
- Posts:
- 257
- Downloads:
- 15
- Uploads:
- 56
- Thanks:
- 14
- Thanked:
- 4 times in 4 posts
August 28, 2017 at 7:02 am #1058866Hi Luna, I checked the link for map page, and that is not showing the total number of items like before: http://www.southsouthworld.org/map?isc=1&ordering=zelevance&category_id=0,8,31,50,62,63,75,76,88&xf_9%5B0%5D=2
Is it possible to make it work on only the map page and not the home page?
Luna Garden ModeratorLuna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
August 28, 2017 at 10:22 am #1058925southsouthworld Friendsouthsouthworld
- Join date:
- April 2017
- Posts:
- 257
- Downloads:
- 15
- Uploads:
- 56
- Thanks:
- 14
- Thanked:
- 4 times in 4 posts
August 29, 2017 at 7:29 am #1059112I created the theme "Total", you can add the code to that theme and make the map use the template.
Many thanks Luna!
Kindest regards,
AlyssaLuna Garden ModeratorLuna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
August 30, 2017 at 10:35 am #1059438AuthorPostsThis topic contains 19 replies, has 3 voices, and was last updated by southsouthworld 7 years, 2 months ago.
The topic ‘How to show total number of items for each extra field selected?’ is closed to new replies.