Keyword

Remove Not assigned categories from New Item category list

  • dthomas32308
  • dthomas32308's Avatar Topic Author
  • Offline
  • New Member
More
14 years 1 day ago #89002 by dthomas32308
I am trying to figure out how to not only gray out the categories that a user is not assigned but remove them all together. Has anyone been successful in this? If so, how? I know that Flexicontent does this natively with Flexiaccess integrated but am trying to use K2 as it is much more flexible. Thanks in advance.

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

  • dthomas32308
  • dthomas32308's Avatar Topic Author
  • Offline
  • New Member
More
13 years 11 months ago #89003 by dthomas32308
So is there no help on this?

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

More
13 years 11 months ago #89004 by Jiliko.net
Hi,

You can do it like this :

- Override the core K2 item form layout by copying the file 'components/com_k2/views/item/tmpl/form.php' to 'templates/YOURJOOMLATEMPLATE/html/com_k2/item/form.php'
- Edit this new file and add this js code to it (in 2.4.1, i've added this in line 208, just before the end of the K2 js part) :

window.addEvent('domready',function () {
$$('#catid option').each(function(item, index){
if (item.getProperty('disabled'))
item.remove();
});
});

I've just tested on a local website with Joomla! 1.5.20, K2 v2.4.1 and mootools 1.1/1.2

Olivier

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

  • dthomas32308
  • dthomas32308's Avatar Topic Author
  • Offline
  • New Member
More
13 years 11 months ago #89005 by dthomas32308
Thank you very much for this! I appreciate your help very much!

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

More
13 years 4 months ago #89006 by Roman Pozdnev
Thank you)

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

More
13 years 4 months ago #89007 by Kert Ülenõmm
Thank you Olivier, worked great!

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

More
13 years 4 months ago #89008 by Roman Pozdnev
Stopped working after I edited file form in order to

1 remove alias

2 remove tags

3 remove content editor

4 remove mark featured

community.getk2.org/forum/attachment/download?id=3536014%3AUploadedFile%3A244760

:(

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


Powered by Kunena Forum