Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • Luna Garden Moderator
    #1056927

    Hi,

    You could follow this post: https://www.joomlart.com/forums/topic/display-number-next-to-search-results/
    Try and tell me the results.

    southsouthworld Friend
    #1056947

    Hi 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,
    Alyssa

    Mo0nlight Moderator
    #1057095

    Hi.

    You could try this.
    Edit the file :
    components/com_jak2filter/views/itemlist/view.html.php

    Look 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.php

    Look 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


    1. Screen-Shot-2017-08-18-at-11.32.22-AM
    southsouthworld Friend
    #1057175

    Thank you very much will try it and let you know my results dear Luna!

    southsouthworld Friend
    #1057653

    I followed the steps Luna and it didnt work… 🙁

    Luna Garden Moderator
    #1057906

    Hi,

    Update the info of your site: URL, admin account, FTP account on first post, our developer will check this problem for you.

    southsouthworld Friend
    #1058006
    This reply has been marked as private.
    Luna Garden Moderator
    #1058118

    Hi,

    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=2

    southsouthworld Friend
    #1058527

    Thank 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,
    Alyssa

    Luna Garden Moderator
    #1058583

    I’ve just removed it, please check.

    southsouthworld Friend
    #1058865

    Thank you very much Luna!! 🙂

    southsouthworld Friend
    #1058866

    Hi 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 Moderator
    #1058925

    Hi,

    Both Menu Home and Map use the same template Directory, you must choose one of them has the different theme, then I’ll add the code the theme you want to show the Total Number.

    southsouthworld Friend
    #1059112

    I created the theme "Total", you can add the code to that theme and make the map use the template.

    Many thanks Luna!

    Kindest regards,
    Alyssa

    Luna Garden Moderator
    #1059438

    Hi,

    I just add the code for you. Kindly checking and confirm the results.

Viewing 15 posts - 1 through 15 (of 19 total)

This 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.