help to better help you:
Please: add always Joomla / JEM version and details to your posts, so we can try to reproduce your issue!
How to: adapting frontend views
How to: adapting frontend views
10 years 7 months ago - 10 years 7 months ago
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?
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?
Last edit: 10 years 7 months ago by jojo12.
Please Log in or Create an account to join the conversation.
Re: How to: adapting frontend views
10 years 7 months ago - 10 years 7 months agohow 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.
Last edit: 10 years 7 months ago by Bluefox.
The following user(s) said Thank You: Hoffi
Please Log in or Create an account to join the conversation.
Re: How to: adapting frontend views
10 years 7 months ago
Some views use a shared "sub-layout" file e.g. for the table part.
These files are located on
To override copy them to
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).
These files are located on
Code:
/component/com_jem/common/views/tmpl/
Code:
/templates/(your-site-template)/html/com_jem/common/
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).
Please Log in or Create an account to join the conversation.
Re: How to: adapting frontend views
10 years 7 months agowhoops, thx for pointing to that.@Bluefox: In the path you wrote the "/html" part is missing before "/com_jem".
(should be fine now)
Please Log in or Create an account to join the conversation.
Time to create page: 0.580 seconds