-
AuthorPosts
-
southsouthworld Friend
southsouthworld
- Join date:
- April 2017
- Posts:
- 257
- Downloads:
- 15
- Uploads:
- 56
- Thanks:
- 14
- Thanked:
- 4 times in 4 posts
August 23, 2017 at 12:10 pm #1058154Hi Joomlart team,
I would like some help, my map pages are set as K2 category menu types. I would like to copy the code from the JAK2 Filter component folder to allow 50-100 K2 Items to appear on the map. Can someone help me to locate the code for this so I can get the K2 category menu type to show more than 6 K2 items on the page at a time?
See the Africa map as an example: http://africa.southsouthworld.org/
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 24, 2017 at 11:01 am #1058404Number Item display in List depends on how you config on JA K2 Filter or the Menu Item.
In JA K2 Filter, you set like this capture: https://static.joomlart.com/images/userguide/jaec/ja_k2_filter/update/component-item-layout.png In primary text, set to 50 Item for example.
For menu, just the same.
Remember, if you set to show too many item, it’ll slow down your site speed.southsouthworld Friendsouthsouthworld
- Join date:
- April 2017
- Posts:
- 257
- Downloads:
- 15
- Uploads:
- 56
- Thanks:
- 14
- Thanked:
- 4 times in 4 posts
August 25, 2017 at 11:23 am #1058589Thank Luna for the reply. However the problem is that JA K2 Filter menu type is not compatible with the multiple K2 categories component I installed, so for the other map pages they configured as K2 category menu types. I hope that makes sense. So now my task is to copy the codes from JA K2 Filter folder across to the K2 folder so I can get K2 category menu type to display more than 6 K2 items on the page at a time.
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 28, 2017 at 8:12 am #1058885In K2 Menu Item setting and K2 Options also have the setting to choose how many K2 Items you want.
Here is the code in JA Directory show the Map, remember to put them to category.php in folder HTML overwrite of K2.
<?php $locations = (object) array( 'location' => new stdClass(), 'latitude' => new stdClass(), 'longitude' => new stdClass(), 'info' => new stdClass() ); $i = 0; $baseURL = JUri::base(); $sections = array('leading', 'primary', 'secondary', 'links'); foreach($sections as $section) { if(isset($this->{$section}) && count($this->{$section})) { foreach($this->{$section} as $key=>$item) { $latitude = $longitude = ''; if(count($item->extra_fields)) { foreach ($item->extra_fields as $extraField) { if($extraField->alias == 'latitude') $latitude = $extraField->value; if($extraField->alias == 'longitude') $longitude = $extraField->value; } } if($latitude && $longitude) { $catParams= new JRegistry($item->categoryparams); $icon = $catParams->get('category_marker', 'images/joomlart/directory-icons/default-marker.png'); $icon = $baseURL.'/'.$icon; $locations->location->{$i} = ''; $locations->latitude->{$i} = $latitude; $locations->longitude->{$i} = $longitude; $locations->info->{$i} = '<a class="marker-title" href="'.$item->link.'">'.$item->title.'</a>'; foreach ($item->extra_fields as $key=>$extraField): if($extraField->value != ''): if(($extraField->type != 'header') && ($extraField->alias != 'latitude') && ($extraField->alias != 'longitude')): $locations->info->{$i} .= '<div class=""><span class="">'.$extraField->name.':</span>'; $locations->info->{$i} .= '<span class=""> '.$extraField->value.'</span></div>'; endif; endif; endforeach; $locations->info->{$i} .= '<img class="marker-img" src="'.$item->imageSmall.'" alt="" />'; @$locations->icon->{$i} = $icon; $i++; } } } } if($i) { $jamap = "{jamap locations='".json_encode($locations)."' map_width='100%' map_height='455' zoom='4' disable_scrollwheelzoom='1' display_scale='1' display_overview='1'}{/jamap}"; echo $jamap; } ?>
southsouthworld Friendsouthsouthworld
- Join date:
- April 2017
- Posts:
- 257
- Downloads:
- 15
- Uploads:
- 56
- Thanks:
- 14
- Thanked:
- 4 times in 4 posts
August 28, 2017 at 10:32 am #1058931Thank 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 29, 2017 at 2:07 pm #1059232Hi Luna I just looked at the code, the codes in the com_k2 folder for category.php appear to already have the same codes.
Please help me find the code to allow me to change the primary count of K2 items on the map for K2 Category menu type. I need to change the primary count for K2 categories menu type, but when I try to change the primary count of 4 on Joomla admin panel it won’t let me click on it. See the following screenshots below.
-
Luna Garden Moderator
Luna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
August 30, 2017 at 10:44 am #1059442southsouthworld Friendsouthsouthworld
- Join date:
- April 2017
- Posts:
- 257
- Downloads:
- 15
- Uploads:
- 56
- Thanks:
- 14
- Thanked:
- 4 times in 4 posts
August 31, 2017 at 2:36 pm #1059701Hi Luna can you please kindly tell me where I can find the value to set inherit from component to "no" in the menu item?
Kindest regards,
Alyssasouthsouthworld Friendsouthsouthworld
- Join date:
- April 2017
- Posts:
- 257
- Downloads:
- 15
- Uploads:
- 56
- Thanks:
- 14
- Thanked:
- 4 times in 4 posts
September 4, 2017 at 6:55 pm #1060285Hi Luna,
I realised that the menu item for K2 category type does not have the option to set inherit from component to no. This is only available to change in the menu item for JaK2 filter item list type. See in this link: http://www.southsouthworld.org/administrator/index.php?option=com_menus&view=item&layout=edit&id=226
Please kindly let me know what I can do next?
Look forward to hearing from you.
- This reply was modified 7 years, 3 months ago by southsouthworld.
- This reply was modified 7 years, 3 months ago by southsouthworld.
Luna Garden ModeratorLuna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
September 6, 2017 at 3:57 am #1060647For example menu Item ID is 226 set to show category Africa ID 39. The layout of Africa follow the setting of Parent Category which is Directory. Just change the Display setting of Directory corresponding change the Display of Africa.
If you want to Africa has its own setting, don’t set to inherit from Directory.
southsouthworld Friendsouthsouthworld
- Join date:
- April 2017
- Posts:
- 257
- Downloads:
- 15
- Uploads:
- 56
- Thanks:
- 14
- Thanked:
- 4 times in 4 posts
September 6, 2017 at 8:51 am #1060725Thanks luna i totally forgot that K2 categories had their own display settings, I made the primary count for the k2 category "directory" to 60 and now it works! 😀
Many many thanks for your patience and kind support!
Kindest regards,
Alyssa -
AuthorPosts
Viewing 11 posts - 1 through 11 (of 11 total)This topic contains 10 replies, has 2 voices, and was last updated by southsouthworld 7 years, 3 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Jump to forum