Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

How to: adapting frontend views 8 years 2 months ago #13620

  • jojo12
  • jojo12's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • Posts: 3486
  • Thank you received: 390
Hi, I know how to make overrides with css. But in some cases I would like to adapt more, which needs changes in the views/tmpl/default.php, e.g.:
in Switzerland the addresses are like that:
Hotel Schweiz
Luzernerstr. 20
6000 Luzern
I think, in other countries, there are other systems. So this change should be only for me or some swiss people.
how and where I put this alternated default.php?
on JEM 2.3.3 stable in latest Joomla (3.10.2) Protostar php7.4.15
Personally I use t4_B5 template with t4_system plugin framework with bootstrap 5 and fontawesome)
(I prefer free "Signal" or paid "Threema" instead of "Whatsapp".)

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

Last edit: by jojo12.

How to: adapting frontend views 8 years 2 months ago #13621

how and where I put this alternated default.php?


If you want to use a custom/override default.php it can be done by adding it in the template folder. Creating a custom-menu item won't work for the moment.


Override
Let's say you want to alter the eventslist view, in that case you copy "default_events_table.php+default.php" to "templates/*current template*/html/com_jem/eventslist" and try it out. it will overrule the default one.

Custom menu-item
For this one you can look at the post of Davod . But before it can be used the view.html files need to be adapted, see Issue #700


about the address-notation:
keep in mind that the ical-output or mailer plugin probably need to be adjusted too and for those the above is not usefull.
(won't respond to PM)
==================================================================
running: pre-alpha JEM 4.x (custom version) + Joomla 4.0.0-beta7 + PHP 7.3
The following user(s) said Thank You: Hoffi

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

Last edit: by Bluefox.

How to: adapting frontend views 8 years 2 months ago #13622

  • Hoffi
  • Hoffi's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 2279
  • Thank you received: 449
Some views use a shared "sub-layout" file e.g. for the table part.
These files are located on
/component/com_jem/common/views/tmpl/
To override copy them to
/templates/(your-site-template)/html/com_jem/common/
and modify as required.

Note: At the moment not all models provide all data so using these common files in other views may not show all data as expected (e.g. event images in day view - see issue #631 ).

@Bluefox: In the path you wrote the "/html" part is missing before "/com_jem".

@Jojo: This sounds like a feature request "make address output configurable (like date/time)". ;)
Something like date/time format or meta data where user can freely place tokens and free text.
This could be used for multi-line output but also as one-liner where linefeed is replaced by a comma (or a configurable separator).
Pessimists are optimists with experience!
The following user(s) said Thank You: jojo12, Bluefox

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

How to: adapting frontend views 8 years 2 months ago #13623

@Bluefox: In the path you wrote the "/html" part is missing before "/com_jem".

whoops, thx for pointing to that.
(should be fine now)
(won't respond to PM)
==================================================================
running: pre-alpha JEM 4.x (custom version) + Joomla 4.0.0-beta7 + PHP 7.3

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

  • Page:
  • 1
Time to create page: 0.671 seconds

Donate

If you find JEM useful and if you use it on your site, please consider a donation to the project.

Private Messages

You are not logged in.

Follow us......