- Posts: 2
- Thank you received: 0
Create new views
- Petr Coufal
- Topic Author
- Offline
- New Member
Less
More
2 years 1 month ago #150294
by Petr Coufal
Create new views was created by Petr Coufal
Hello, I want to create 2 new views in frontend (maybe layout):
a) for category
b) for detail of item (event)
In component is not classic MVC for override now = exist only different layouts - default, table, timeline, columns. And i wanto to create more differrent layouts/views e.g. layout/view #1 for category A and layout/view #2 for category B (of default layout). And e.g. layout/view #3 for category C and layout/view #4 for category D (of table layout).
I want to solve the same problem for the event item preview detail == other layout/view.
Please, how to do it?
a) for category
b) for detail of item (event)
In component is not classic MVC for override now = exist only different layouts - default, table, timeline, columns. And i wanto to create more differrent layouts/views e.g. layout/view #1 for category A and layout/view #2 for category B (of default layout). And e.g. layout/view #3 for category C and layout/view #4 for category D (of table layout).
I want to solve the same problem for the event item preview detail == other layout/view.
Please, how to do it?
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
2 years 1 month ago #150301
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Create new views
Hello
Here are the steps:
- Copy the file components/com_eventbooking/view/category/tmpl/default.xml, change it to something else like custom.xml
- Copy the file default.php, change it to custom.php (or any name you want)
- Copy events_default_layout.php, change it to events_custom_layout.php
Modify code. Then you should be able to create a menu item to link to category view using that new layout
Tuan
Here are the steps:
- Copy the file components/com_eventbooking/view/category/tmpl/default.xml, change it to something else like custom.xml
- Copy the file default.php, change it to custom.php (or any name you want)
- Copy events_default_layout.php, change it to events_custom_layout.php
Modify code. Then you should be able to create a menu item to link to category view using that new layout
Tuan
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
2 years 1 month ago #150302
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Create new views
Or I wonder why don't you override one of existing layouts ? There are 4 layout options for category already, so it should be enough. Just override these existing layouts and change it to look like the way you want instead of creating new view/layout
Tuan
Tuan
Please Log in or Create an account to join the conversation.
- Petr Coufal
- Topic Author
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
2 years 1 month ago #150307
by Petr Coufal
Replied by Petr Coufal on topic Create new views
Thank you! Do I have to move the xml file to the override folder (template / html / ....)?
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
2 years 1 month ago #150308
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Create new views
No, just leave it there
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
Copyright © 2024 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.