Keyword

[SOLVED] Full frontend edit form page in K2

  • Mikhail Vinyukov
  • Mikhail Vinyukov's Avatar Topic Author
  • Offline
  • New Member
More
8 years 6 months ago - 8 years 6 months ago #148295 by Mikhail Vinyukov
[SOLVED] Full frontend edit form page in K2 was created by Mikhail Vinyukov
Hello.

Is there any way to make a full designed frontend edit form page in K2? I made it to open in a new window but it's just a form page without site header, footer and the other site elements. I really need to make the frontend edit page looks like just another site page.
Last edit: 8 years 6 months ago by Mikhail Vinyukov.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 6 months ago #148389 by Krikor Boghossian
Replied by Krikor Boghossian on topic Full frontend edit form page in K2
You can override the itemform.php file of K2 and the component.php to change the look & feel of the form.
More on overriding can be found here: getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates

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

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

  • Mikhail Vinyukov
  • Mikhail Vinyukov's Avatar Topic Author
  • Offline
  • New Member
More
8 years 6 months ago #148397 by Mikhail Vinyukov
Replied by Mikhail Vinyukov on topic Full frontend edit form page in K2
I know about overriding and use it often. K2 displays editform page without site header, footer, sidebars and the other elements in index.php. It's just naked form page. How can I change it?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 6 months ago #148404 by Krikor Boghossian
Replied by Krikor Boghossian on topic Full frontend edit form page in K2
When you see ?tmpl=component in (any extension's) URL then the component.php file is being used instead of the regular index.php.
This applies to all extensions.

To understand what component.php does you need to read this post.
docs.joomla.org/Understanding_Joomla!_templates

If you need to isolate K2 in the component.php so it does not affect other extension you can include these modules (header/ footer) only when K2 is being used.

An example would be: github.com/kricore/Advanced-templating-with-K2/blob/master/_inc/cheatsheet.php#L26-L44

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

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

  • Mikhail Vinyukov
  • Mikhail Vinyukov's Avatar Topic Author
  • Offline
  • New Member
More
8 years 6 months ago - 8 years 6 months ago #148559 by Mikhail Vinyukov
Replied by Mikhail Vinyukov on topic Full frontend edit form page in K2
Thanks! I found this
JRequest::setVar('tmpl', 'component');
in the edit function of item controller. So I just changed it to
JRequest::setVar('tmpl', 'index');
and got exactly what I need. Solved.
Last edit: 8 years 6 months ago by Mikhail Vinyukov.

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


Powered by Kunena Forum