Keyword

Add item front end, default to current category

  • COR Consulting
  • COR Consulting's Avatar Topic Author
  • Offline
  • Junior Member
More
9 years 7 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
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 7 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.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
9 years 5 months ago #143431 by Agnes
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:
  • 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
The category should already be defaulted and users should not be able to see the other categories not pre-selected and for which they have no access rights.
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
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 5 months 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

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
9 years 5 months ago #143459 by Agnes
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
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 5 months ago #143492 by Krikor Boghossian
Replied by Krikor Boghossian on topic Add item front end, default to current category
You 're welcome Agnes.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum