- Posts: 17
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- Remove Not assigned categories from New Item category list
Remove Not assigned categories from New Item category list
- dthomas32308
-
Topic Author
- Offline
- New Member
Less
More
14 years 7 months ago #89002
by dthomas32308
Remove Not assigned categories from New Item category list was created 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
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 17
14 years 7 months ago #89003
by dthomas32308
Replied by dthomas32308 on topic Remove Not assigned categories from New Item category list
So is there no help on this?
Please Log in or Create an account to join the conversation.
- Jiliko.net
-
- Offline
- Platinum Member
Less
More
- Posts: 567
14 years 7 months ago #89004
by Jiliko.net
Replied by Jiliko.net on topic Remove Not assigned categories from New Item category list
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
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
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 17
14 years 7 months ago #89005
by dthomas32308
Replied by dthomas32308 on topic Remove Not assigned categories from New Item category list
Thank you very much for this! I appreciate your help very much!
Please Log in or Create an account to join the conversation.
- Roman Pozdnev
-
- Offline
- New Member
Less
More
- Posts: 7
13 years 11 months ago #89006
by Roman Pozdnev
Replied by Roman Pozdnev on topic Remove Not assigned categories from New Item category list
Thank you)
Please Log in or Create an account to join the conversation.
- Kert Ülenõmm
-
- Offline
- New Member
Less
More
- Posts: 2
13 years 11 months ago #89007
by Kert Ülenõmm
Replied by Kert Ülenõmm on topic Remove Not assigned categories from New Item category list
Thank you Olivier, worked great!
Please Log in or Create an account to join the conversation.
- Roman Pozdnev
-
- Offline
- New Member
Less
More
- Posts: 7
13 years 11 months ago #89008
by Roman Pozdnev
Replied by Roman Pozdnev on topic Remove Not assigned categories from New Item category list
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
:(
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.
- Forum
- K2 Community Forum
- English K2 Community
- Remove Not assigned categories from New Item category list