Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
12/12/2014 at 1:06 am #312722
I’m trying to alter the chosen.js options when it’s called on the category dropdown. We are using the tile plus layout.
Is this possible by adding a tile-plus.min.js file to our theme in the following directory “theme/connections-templates/tile-plus” and adding options to the following code? “$(‘select[name=cn-cat]’).chosen();”12/12/2014 at 10:32 am #312740
Yes … I just tested with cMap to confirm (same core logic is use to find and load files). So either of these should work fine:
If the core WP constant SCRIPT_DEBUG is set to false (default) and both files exist in the above path, the
minfile will load. If only one of the files exist in the above path, then the file found will be loaded.
Of the two paths listed above, the theme folder would have a higher order of preference, meaning if the files exists in both locations, the version in the theme folder would load and not the version in the uploads folder.
The contents of the file … I highly suggest using
tile-plus.jsas your base and then change the following line with the Chosen option you want:
Hope that helps, let me know!12/12/2014 at 1:59 pm #312749
Thank you. I was successfully able to add tile-plus.js to our theme.
Our category dropdown has parent and child categories.
What I’m hoping to do is disable the parent categories in the dropdown, so that you can’t filter results with them. Chosen.js inherits “disabled” attributes if they are present in the original <select> on which it is called (http://harvesthq.github.io/chosen/options.html#attributes). Since I don’t have control over the <select> html, I was trying to add the disabled attribute with jQuery. If I inspect the <select> element, I can see that the attributes have been added, but I still seem to be able to select the parent categories.
Here is what I currently have in tile-plus.js
$(“#cn-tile-plus .cn-category-select.cn-enhanced-select option.cn-cat-level-1”).attr(“disabled”,true);
If there’s a better way to disable parent categories, I’m open to that too.12/13/2014 at 11:45 am #312770
Another option that should yield your desired result… an undocumented beta feature…
enable_category_group_by_parent=trueto the shortcode so you have something like this:
[connections enable_category_group_by_parent=true]12/16/2014 at 5:49 pm #312989
That option worked great.
One other question. Is it possible to re-order the dropdown categories? Right now, they are listed alphabetically.
Thanks!12/17/2014 at 9:31 am #313013
Sorry, not, it’s not possible at this time. The taxonomy code is being revised so at some point this maybe added as a feature. The new code does already allow for a few different sorting methods. Actually the new category widget in the Widget Pack already uses this new code but I did not opt to include the sorting as as option. This new code will at some point next year be used throughout Connections so something like this will be possible. I’m not using it right now because it is much more db query heavy. This will not matter for the new category widget because it uses fragment caching so the extra db hits only occur once in awhile.
Hope that helps!12/17/2014 at 12:56 pm #313024
If you would considering adding this as a feature, we’d be happy to help fund it. Just let me know the approximate hours of your time it would take and your rate. Please let me know if that would be an option. =)
David12/19/2014 at 9:35 am #313150
Maybe… what type of ordering do you need? The current beta code supports:
term_id | name | slug | term_group | parent | count
Honestly, even though the ode supports these fields, I don’t see how sorting by any other field that name would be useful.12/19/2014 at 9:44 am #313151
What we’re actually needing is manually ordering of the categories. To give a specific example, one of our categories is for the age range of a child. The options are:
Yet when Connections creates the category filter select menu and does an alpha sort, these are put into the following order, which no longer makes sense:
Thanks for your help!
David12/20/2014 at 2:46 pm #313209
I can think of a way to do this and incorporate it into a template, but … by explicitly setting a category order would mean explicitly including only the specified categories … meaning any category not set in the order would not be displayed. Does that make sense?
If you’d like to discuss funding this further, please use the contact link at the bottom of the page. Please make sure to paste a link to this forum thread so I can relate the two, thanks!
You cannot reply to this support topic. Please open your own support topic.