- Posts: 15
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- Create K2 item from the frontend in a separate window, not modal
Create K2 item from the frontend in a separate window, not modal
- adil
-
Topic Author
- Offline
- New Member
How to create the addition of K2 item from the frontend in a separate window, not in the modal? I wanted to make changes in the itemform.php file which is in a separate template for the category ... onar \ components \ com_k2 \ templates \ news, but it has a separate line for require_once (JPATH_SITE. '/ Administrator / components / com_k2 / views / item / tmpl / default.php ') ;.
Then I thought to create a video.php file at the same address, but it still refers to the default.php file. I need for each category and for each type of a particular menu to have its own input window with its own fields.
I repeat: the task is to make an input button for each category separately and with its own fields (for example: I do not need alias fields, tags, attachments, media and content, etc).
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
The file must always be named "itemform.php".
However you MUST copy the source PHP/HTML code from /administrator/components/com_k2/views/item/tmpl/default.php first INTO each itemform.php file and then modify it as you wish.
Finally, create menu items of K2 "item edit form" type (jmp.sh/9cB0TWb) pointing to each different sub-template.
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
Please Log in or Create an account to join the conversation.
- adil
-
Topic Author
- Offline
- New Member
- Posts: 15
The menu showed that there should be that template (itemmenu pic), the system saw it, everything is ok. Now I want to make changes to the fields under my own names (itemform pic) , so that they are called according to the template, so that when you hide, the standard fields are not closed (videozalk2nav pic). After all, we need for each category to have its own input fields from the frontend. I made changes to the itemform.php code but all the same, the fields have not changed (frontend pic), if it's in the cache, I cleaned it up and updated it. I ask your help in solving this problem.
in the attachment I send you screenshots
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
Please Log in or Create an account to join the conversation.
- adil
-
Topic Author
- Offline
- New Member
- Posts: 15
Yes, I did copy the actual PHP/HTML code into your itemform.php files from /administrator/components/com_k2/views/item/tmpl/default.php.
I am waiting for further instructions.
You were able to view the screenshots?
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
I have fixed it here: github.com/getk2/k2/commit/53f2758e8b7ed40299d82bacb785987997aeac9a
Install K2 v2.9.1 (dev) from github.com/getk2/k2/archive/master.zip to make use of that fix.
Please Log in or Create an account to join the conversation.
- adil
-
Topic Author
- Offline
- New Member
- Posts: 15
Thank you very much, but it really helped (in the attachment screenshot). I have hidden all unnecessary fields through CSS. Now under each category I will make my own entry page.
Now the main question: how can you make the input window of materials not open to full screen, so that it is not modal but a neat window.
How can this be realized?
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
Please Log in or Create an account to join the conversation.
- adil
-
Topic Author
- Offline
- New Member
- Posts: 15
I meant opening the input window of item not on the fullscreen mode but so that a separate window would appear.
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
Please Log in or Create an account to join the conversation.
- adil
-
Topic Author
- Offline
- New Member
- Posts: 15
I meant that the input box for items came out in the window of a valid material or in the center of the page and on the sides were modules with news that are visible on other pages
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
Please Log in or Create an account to join the conversation.
- adil
-
Topic Author
- Offline
- New Member
- Posts: 15
I understand correctly that in K2 it is not possible to implement the function of adding items not in full screen?
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
Please Log in or Create an account to join the conversation.
- adil
-
Topic Author
- Offline
- New Member
- Posts: 15
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- Create K2 item from the frontend in a separate window, not modal