- Posts: 22
COMMUNITY FORUM
Add item front end, default to current category
- COR Consulting
-
Topic Author
- Offline
- Junior Member
Less
More
10 years 2 months ago #141072
by COR Consulting
Add item front end, default to current category was created by COR Consulting
In the front end of the site when users are adding a new content item i would like the category to default to the category they are currently in. For examaple they browse to the category Resources>Downloads. they want to add a new item in the download category. When the user clicks add item, the category should already be defaulted to Downloads and they should not be able to change the category. I am pretty sure i need to change something in itemform.php and i understand how to make a copy and put it in my template folder to override...however i am not proficient enough to know what changes to make in this page to accomplish this goal. The idea would be similar to when you are in the back end, select a category from the filters and then click new item...it defaults the category.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 2 months ago #141097
by Krikor Boghossian
Replied by Krikor Boghossian on topic Add item front end, default to current category
Hello you can set a Pre-selected category if you map the itemform into a menu item.
Please Log in or Create an account to join the conversation.
- Agnes
-
- Offline
- New Member
Less
More
- Posts: 6
10 years 1 week ago #143431
by Agnes
Replied by Agnes on topic Add item front end, default to current category
The default category and sub-categories selection in the menu "item edit form" options works fine. However, when users are adding a new content item using the K2 add item form on the frontend:
Could you please let me know how to address the issue?
Thanks
PS: I could not add a screenshot for the visula, the up-loader is not working.
- the category field shows all K2 categories regardless of the user/usergroup access permissions.
- The pre-selected default categories are bold and the other categories font color are faded
Could you please let me know how to address the issue?
Thanks
PS: I could not add a screenshot for the visula, the up-loader is not working.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 1 week ago #143456
by Krikor Boghossian
Replied by Krikor Boghossian on topic Add item front end, default to current category
If you remove these categories the category tree will be broken.
These categories however are not selectable.
You can use a CSS solution as described here:
github.com/joomlaworks/k2-v3-dev-build/issues/81
These categories however are not selectable.
You can use a CSS solution as described here:
github.com/joomlaworks/k2-v3-dev-build/issues/81
Please Log in or Create an account to join the conversation.
- Agnes
-
- Offline
- New Member
Less
More
- Posts: 6
10 years 1 week ago #143459
by Agnes
Replied by Agnes on topic Add item front end, default to current category
Thank you for your reply. After so many frustrations, I hope to be able to solve this issue once for all.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 1 week ago #143492
by Krikor Boghossian
Replied by Krikor Boghossian on topic Add item front end, default to current category
You 're welcome Agnes.
Please Log in or Create an account to join the conversation.