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
#13620
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?
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 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.
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
#13622
Some views use a shared "sub-layout" file e.g. for the table part.
These files are located on
Code:
/component/com_jem/common/views/tmpl/
To override copy them to
Code:
/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).
The following user(s) said Thank You: jojo12, Bluefox

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

Re: How to: adapting frontend views

10 years 7 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)

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

Time to create page: 0.580 seconds