Keyword

Category-view: How to load all the items for marker maps

  • Gerben
  • Gerben's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 8 months ago #150842 by Gerben
Hi there,

I'm creating a google map inside the category.php
On this map i want to show all the items with a marker based on the extra fields
I have set the leading to 8 because i want 8 items on every pagination.

Every thing is working great but on the map are only showing the first 8 because i use the foreach loop:

<?php foreach($this->leading as $key=>$item): ?>

<? endforeach;?>

Is there a way to load all the current items inside the map instead of only the $this->leading ?
Hope to hear from you :)

Greeting,
Gerben

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 8 months ago #150850 by Krikor Boghossian
Replied by Krikor Boghossian on topic Category-view: How to load all the items for marker maps
Hello,
How is that map generated?
I would personally port it into a K2 Content module template, load it in the category view (menu item) and since it has its own settings, the limit would be something really high to force it to load all items.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Gerben
  • Gerben's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 8 months ago #150851 by Gerben
Hey Krikor,

Thanks for answering so quick, really cool..!
The map itself is inside the category.php and the markers are loading with the foreach loop.
The k2 content module is a good idea..!
But i also use a small filter, and this filter is putting the output in the category view.
So when i place the maps in the k2 content module and the user is going to a sub category all the items are still on the map with the k2 content module instead of only the items inside the sub category :)

So thats why i was asking for a trick to load all the items that are loading in the category view :)

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 8 months ago #150853 by Krikor Boghossian
Replied by Krikor Boghossian on topic Category-view: How to load all the items for marker maps
If you move the map in the module, you can pretty much load it anywhere and select which items to load.
Eg: you can load it in the subcategory and only load the subcategory's items.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Gerben
  • Gerben's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 8 months ago #150864 by Gerben
Yes that's true but i have some more filter option based on the extra fields.
The results are showing inside the category but then only the limited $this->leading items are showing on the map.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 8 months ago #150871 by Krikor Boghossian
Replied by Krikor Boghossian on topic Category-view: How to load all the items for marker maps
Can you send me a link to your site, so I can understand the issue better?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Gerben
  • Gerben's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 8 months ago - 8 years 8 months ago #150873 by Gerben
No problem, you can see it (just removed url)

It's on development so don't look at the total image ;) but you know how that goes.
Last edit: 8 years 8 months ago by Gerben.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 8 months ago #150876 by Krikor Boghossian
Replied by Krikor Boghossian on topic Category-view: How to load all the items for marker maps
Ok I saw the map.
In general it looks fine. I would add the module in that place. There is no easy way to load all the items there, other than directly querying the database and loading the items.

On the hand you can port these extrafield checks really easy on the module.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Gerben
  • Gerben's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 8 months ago #150886 by Gerben
Hey Krikor,

I will give it a try today to load all the items so i can combine the map, filter and category view.
Maybe to build inside the core a extra option for $this->allitems
It's a bit of a bummer that there is no plugin or module already created to do this map trick :)

I also tried it with the module and all the items are loading good on the map but on that case it is not responding to the filter and output of the category view :)

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

  • Gerben
  • Gerben's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 8 months ago #150892 by Gerben
Hey Krikor,

I managed it..!
It works great know with the filter, category view and pagination.
i added the views > itemlist > view.html.php

Cheers

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


Powered by Kunena Forum