The Joomla! Forum ™



Forum rules


Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 60 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Mon Mar 30, 2009 6:31 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Mar 04, 2009 8:06 pm
Posts: 20
Thank you for the tutorial. After reading it, I have some questions.

I am using the beez template and want to turn of the date created text in the search results. I was able to remove that text by editing components/com_search/views/views/search/view.html.php.

How can I override that view? I tried by copying view.html.php in the templates/beez/html/com_search/search folder. However, it does not work.

Can you clarify my doubt.

Thanks,
Sonal


Top
 Profile  
 
PostPosted: Mon Mar 30, 2009 11:27 pm 
User avatar
Joomla! Hero
Joomla! Hero

Joined: Fri Aug 12, 2005 2:45 am
Posts: 2265
Location: Brisbane, Australia
You want to copy /components/com_search/views/search/tmpl/default* to /html/com_search/search/default*

Don't copy the view.html.php file - that won't work.

_________________
Andrew Eddie - Tweet @AndrewEddie
<><
http://learn.theartofjoomla.com - Expert videos and tutorials.
http://www.kiva.org/team/joomla - Got Joomla for free? Pay it forward and help fight poverty.


Top
 Profile  
 
PostPosted: Tue Mar 31, 2009 8:08 am 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Sun Mar 18, 2007 12:50 pm
Posts: 332
Location: Netherlands
Great Work!

_________________
Cheers, Babs
-------------------
http://crossinghippos.com


Top
 Profile  
 
PostPosted: Thu Apr 02, 2009 10:53 am 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Wed Feb 27, 2008 4:03 pm
Posts: 124
Location: UK
masterchief wrote:
You want to copy /components/com_search/views/search/tmpl/default* to /html/com_search/search/default*

Don't copy the view.html.php file - that won't work.

Is it possible to override the view.html.php in any way? I'm sure I read that you can override any models, views, etc.

I've modified the way the weblinks submission component works (removed the need to have an account). However I'd prefer to use an override, so changes don't get reverted when Joomla gets updated. Is this possible?

_________________
"Maybe I shouldn't have eaten that packet of powdered gravy I found in the parking lot."
http://www.simpsoncrazy.com


Top
 Profile  
 
PostPosted: Thu Apr 02, 2009 12:43 pm 
User avatar
Joomla! Hero
Joomla! Hero

Joined: Fri Aug 12, 2005 2:45 am
Posts: 2265
Location: Brisbane, Australia
If you are wanting to go that far, you are probably better off copying the whole search component and making changes.

_________________
Andrew Eddie - Tweet @AndrewEddie
<><
http://learn.theartofjoomla.com - Expert videos and tutorials.
http://www.kiva.org/team/joomla - Got Joomla for free? Pay it forward and help fight poverty.


Top
 Profile  
 
PostPosted: Fri Apr 03, 2009 3:57 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Mar 04, 2009 8:06 pm
Posts: 20
masterchief wrote:
You want to copy /components/com_search/views/search/tmpl/default* to /html/com_search/search/default*

Don't copy the view.html.php file - that won't work.



Got it! Thank you for your help.

Sonal


Top
 Profile  
 
PostPosted: Fri Apr 03, 2009 4:01 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Mar 04, 2009 8:06 pm
Posts: 20
Please confirm if my understanding is correct for the following edits I need to make.

*) I was able to remove the 'data created' text in the search results. I need to replace it with another date. This should be a plugin, correct?

*) I want the search areas to be changed from Category, Section, Article to specific categories for the website I am updating(eg. Books, References, etc). For that I will need to write a plugin and edit the SQL query, correct?

Thank you for your help.

Sonal


Top
 Profile  
 
PostPosted: Tue Apr 14, 2009 11:45 am 
Joomla! Intern
Joomla! Intern

Joined: Fri Feb 20, 2009 12:30 am
Posts: 81
Nice tutorial but I think I need to re-read.....or better, I'm goint to print it to study some ot its lines.


Top
 Profile  
 
PostPosted: Sun May 24, 2009 6:21 am 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Tue Nov 14, 2006 3:29 am
Posts: 219
[quote="svivian"]Is it possible to override the view.html.php in any way? I'm sure I read that you can override any models, views, etc.[/quote]
I'd like to know about this too, there are many times I just want to tweak a few design elements without making my own complete component. Often it is little things like Page numbers appearing in Page Titles that most of my clients dont like.


Top
 Profile  
 
PostPosted: Fri Jun 12, 2009 7:06 pm 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Sun Mar 18, 2007 12:50 pm
Posts: 332
Location: Netherlands
You do depend on the variables that the view.html.php sends to the layout (or that the layout grabs from the view.html.php, if you prefer). But you can perform additional tasks in your layout page (like getting stuff from the database or re-formatting content).
Quote:
Often it is little things like Page numbers appearing in Page Titles that most of my clients dont like.
That's actually coming from a content plugin (pagebreak.php). You cannot alter this (well, you can, but you shouldn't). You could however duplicate this plugin, rename it and use it instead of the original. Than tweak it in anyway you like (this plugin also renders the table of content in multi-page articles).

_________________
Cheers, Babs
-------------------
http://crossinghippos.com


Top
 Profile  
 
PostPosted: Fri Jul 03, 2009 10:00 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Wed Dec 10, 2008 1:39 pm
Posts: 104
Location: Germany
Greetings,

I also have a bit of a problem, and with the good old com_search, now basically all I want is a raw view for Ajax, but the standard search has none, and if I override the normal view... well we all know what happens then..You kill your normal search

So Something that would be nice in future version, is to be able to add/extend, and not just override. This way one can add views to existing components, without really touching them.

Maybe this is already possible ???

_________________
Whatever you do will return to you, three folded


Top
 Profile  
 
PostPosted: Fri Jul 10, 2009 7:34 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Fri Jul 10, 2009 7:26 am
Posts: 1
I m new to joomla can you help for getting data into tabular format and with pagination. actually i dont know what I have to do for this.


Top
 Profile  
 
PostPosted: Sat Jul 11, 2009 2:42 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri May 22, 2009 9:04 am
Posts: 20
masterchief wrote:
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.


It's really good, thanks a lot :)


Top
 Profile  
 
PostPosted: Sun Jul 12, 2009 3:16 pm 
Joomla! Explorer
Joomla! Explorer

Joined: Mon Aug 11, 2008 1:16 am
Posts: 459
Location: Newburgh Ny , USA
I tried experimenting with this on a localhost site with RUK_Milkyway.
I'm not sure what that "sliders" chrome does, but I went with implementing it
on the mod_login, since i wanted to enhance that one anyway, just to see what would happen.

I copied the mod-login recursively into the template html directory, I placed the xtml tag in the form
and set name to 'login".

Nothing happened at all. Is this because it is not MVC?

_________________
Learn something new every day!


Top
 Profile  
 
PostPosted: Fri Aug 28, 2009 9:32 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Wed Aug 26, 2009 2:19 am
Posts: 114
Location: Jeddah-Saudi Arabia
thanks chef
i just started reading it
it is fabulous

_________________
PHP designer,
manager,RISEMYWEB
http://www.9or.cc | صور
http://www.risemyweb.com | موقعي


Top
 Profile  
 
PostPosted: Mon Aug 31, 2009 11:43 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Jan 24, 2009 3:13 pm
Posts: 5
Thank you.


Top
 Profile  
 
PostPosted: Fri Oct 23, 2009 9:53 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Sep 30, 2009 6:11 pm
Posts: 46
In my template I wanted to show modules ina postion one after another in the same row.I tried <jdoc:include type="modules" name="user1" style="horz"/> but it didnt give me the result i needed.I replaced it with <jdoc:include type="modules" name="user1" style="horizontal"/>
and edited 'templates/mytemplate/html/modules.php' and added function modChrome_horizontal($module, &$params, &$attribs) like this
unction modChrome_horizontal($module, &$params, &$attribs)
{
$curtemplate = JDocumentHTML::getInstance();

if($GLOBALS[$attribs['name']."_pos"]+0 == 0)
{
?>
<table align="center" width="100%">
<tr>
<?php

}
?>
<td valign="top">
<?php

modChrome_table($module, $params, $attribs); ?>
</td>
<?php
$GLOBALS[$attribs['name']."_pos"]++;
if($curtemplate->countModules($attribs['name']) == $GLOBALS[$attribs['name']."_pos"])
{
?>
</tr>
</table>
<?php
}
}

If there is a better way than this please let me know


You do not have the required permissions to view the files attached to this post.

_________________
Best regards
Sreekanth Dayanand
http://www.outsource-online.net


Top
 Profile  
 
PostPosted: Mon Nov 23, 2009 10:51 am 
Joomla! Intern
Joomla! Intern

Joined: Tue Sep 01, 2009 12:40 pm
Posts: 66
Hello everyone,
I need to override the com_registration, I need to add another field ( 2 radio buttons for the user to select one option or the other.. ).
I have been looking around for tips and stuff, but I cant really find the file that generates the page.

Any help?


Top
 Profile  
 
PostPosted: Mon Nov 23, 2009 8:43 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Wed Feb 27, 2008 4:03 pm
Posts: 124
Location: UK
blablaz wrote:
Hello everyone,
I need to override the com_registration, I need to add another field ( 2 radio buttons for the user to select one option or the other.. ).
I have been looking around for tips and stuff, but I cant really find the file that generates the page.

Any help?

That's not what layout overrides are for. They're only for changing the output of what's already there. You'll have to either find a dedicated user component, or maybe read this tutorial and see if that helps you with where to edit code.

_________________
"Maybe I shouldn't have eaten that packet of powdered gravy I found in the parking lot."
http://www.simpsoncrazy.com


Top
 Profile  
 
PostPosted: Wed Dec 23, 2009 5:53 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Wed Dec 23, 2009 5:50 pm
Posts: 1
I created an override for article/form.php which work fine for normal article submissions, but I've also got a link for "special" users to submit content to a specific category. The link type in the usermenu is ContentSubmit » Article / Bysection This does not seem to be applying the override created for article/form.php. Does anyone know where/how to make an override for this type?


Top
 Profile  
 
PostPosted: Tue Feb 09, 2010 12:40 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Nov 27, 2008 12:40 pm
Posts: 17
masterchief wrote:
It's not really practical to override backend com_content in 1.5 unfortunately.

Any news on this? Maybe it's better in Joomla 1.6? If yes, can I uninstall com_content from 1.5 and install just the com_content 1.6 component to start working on my custom admin/com_content?

PS: I need to be able to upgrade to future versions of Joomla.


Top
 Profile  
 
PostPosted: Sat Feb 27, 2010 5:09 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Jan 10, 2007 1:47 pm
Posts: 48
I'd like to customize the admin/com_content just like some others in this thread. I would like to add a separate image to each article. This image has to be next to the article on a blog layout (which consists out of 6 rows with 2 columns). On the left column the image has to be at the right. On the right column the image has to be at the left.

Putting the image in the content of the article is not user friendly for my end-user. I see that overrides don't work for the admin/com_content component in the administrator backend.

So this leaves one option as I see it now: customize the administrator component / database. A disadvantage is that in case of updates I really have to doublecheck the contents of the update so my changes aren't undone.

Is this the best strategy or are there other options for me (and others)?


Top
 Profile  
 
PostPosted: Mon May 10, 2010 8:31 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri May 07, 2010 9:16 am
Posts: 31
Location: Dhaka
It is ok that we should not override joomla backend com_content. But some times we are in such a situation that we have to change or override some part of any backend component. I am notable to show you guys a specific example but situation demands.

So I think plugin is the best solution.

Cheers!

_________________
Alan


Top
 Profile  
 
PostPosted: Wed Aug 04, 2010 3:55 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Aug 02, 2010 1:02 am
Posts: 33
nice tutorial for me. great work gratz

_________________
http://www.evimdesinema.net


Top
 Profile  
 
PostPosted: Mon Aug 23, 2010 10:05 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Aug 23, 2010 9:16 am
Posts: 3
I have looked at the folder structure and is a model and view the folder, but not in the [drive] folder. So this is a MVC form.

_________________
Please read forum rules regarding signatures: viewtopic.php?t=65


Top
 Profile  
 
PostPosted: Thu Oct 14, 2010 10:59 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Aug 08, 2008 7:33 am
Posts: 45
I am sorry I get an "Article not found" using the link. So maybe I am asking here something which is described in the article.

I understood the common override and how to use it as templater, but I am developing a component with own categories (we have nested ones) and "articles".

It will be often needed that users want to use a default joomla template and just want to change the template by article or category.

It is possible to load multiple css and js, so we had the idea that it would be nice, when we could load 2 templates in one time.

My question is just how I can override the used template in the code? So that my view.html.php is looking itself which template should be used and can set it somehow. Or maybe just loads two templates. One for the general joomla and one just for the com_xyz folder.

Hmm maybe I try to explain it other round. I want to add to the categories the possibility to edit the used templates. I want to add two configuration fields, one with the general joomla template and one complemental with defining the extra doms used by the component.

We already thought about to add every of our categories to the joomla ones and just add an extra edit possibility to the category edit view. Afaik J1.6 will support nested categories also, so maybe we should use the joomla ones.
I dont know. At the end I am just looking how I can set my own template in the view.html.php

Greetz Milbo

BTW: I think the right link is now http://docs.joomla.org/Understanding_Output_Overrides

PS: YEah, I found the simpel solution I was looking for, $template is just something like beez
Code:
$mainframe = JFactory::getApplication();
$mainframe->set('setTemplate', $template);


Now I have only the question, how I can do an override of the override (loading two templates in one time, sounds strange in fact this is already done (template set overrides the default),.. so I look for a way to load three templates at once)


Top
 Profile  
 
PostPosted: Mon Oct 18, 2010 12:54 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Oct 18, 2010 12:05 am
Posts: 3
Wow, this quite a nice tutorial, but for me it's information overload very quick, so I think a good idea is to print all of this, but it's very much just what I needed to learn, thanks!

_________________
Webmaster - Joomla Novice - http://www.bestenettbutikker.no/


Top
 Profile  
 
PostPosted: Wed Nov 03, 2010 2:44 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Nov 01, 2010 5:42 pm
Posts: 10
It appears your extensive tutorial on layout overrides has been moved. Can you give us a new link? Thanks!


Top
 Profile  
 
PostPosted: Wed Nov 03, 2010 3:30 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Sat Apr 05, 2008 9:58 pm
Posts: 25002
Location: @Webdongle
If it moves again then
http://www.google.co.uk/search?num=100& ... =&gs_rfai=
will most likely find it.

Or
http://docs.joomla.org/Special:Search?s ... ext=Search

_________________
'When I'm right nobody remembers when I'm wrong nobody forgets.'

http://weblinksonline.co.uk/joomla-faq.html


Top
 Profile  
 
PostPosted: Thu May 26, 2011 8:55 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Tue Apr 13, 2010 7:40 pm
Posts: 1060
Location: Iowa
This is the new location of the doc (I think it's the same one):
http://docs.joomla.org/Understanding_Output_Overrides

Also, here's another reference:
http://docs.joomla.org/How_to_override_ ... omla!_core

Kind regards,
Nick

p.s. Great work Andrew!

_________________
To God through Jesus Christ be the glory forever and ever!
---------------
Online Joomla Training at http://www.ostraining.com/online/
Sell your templates at https://www.templatecapitol.com/


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 60 posts ]  Go to page Previous  1, 2



Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group