Re: [jgen] Com_templates Override

46 views
Skip to first unread message

rahul borole

unread,
May 18, 2013, 4:51:43 AM5/18/13
to Joomla! General Development
then why you not try to override that file directly
may be it  will goodfor you


On Sat, May 18, 2013 at 12:52 AM, Panagiotis Mantis <mant...@gmail.com> wrote:
Is there a way to override com_templates? I want to make some changes to com_templates/views/style/view.html.php


Thanks

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-gene...@googlegroups.com.
To post to this group, send an email to joomla-de...@googlegroups.com.
Visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Nikolaos K. Dionysopoulos

unread,
May 18, 2013, 4:54:36 AM5/18/13
to joomla-de...@googlegroups.com
You cannot override the View class, you can only override the view template files (inside the tmpl directory of each view). The view class is designed to pass all the necessary data to the view template file.

That said, there's a neat trick. The view template files are actually included by the view class. This means that you can use $this in those files and you're talking directly to your View class. Maybe that's all you need in your case.

Nicholas K. Dionysopoulos

Troy

unread,
May 18, 2013, 4:12:06 PM5/18/13
to joomla-de...@googlegroups.com
not sure why you would want to change that as its only used in the admin afaik, but afaik you'd have to replace the component or hack the core ( bad idea )
Bear
On 5/17/2013 2:22 PM, Panagiotis Mantis wrote:
Is there a way to override com_templates? I want to make some changes to com_templates/views/style/view.html.php


Thanks
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-gene...@googlegroups.com.
To post to this group, send an email to joomla-de...@googlegroups.com.
Visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3336 / Virus Database: 3162/6331 - Release Date: 05/17/13


Troy

unread,
May 18, 2013, 4:18:12 PM5/18/13
to joomla-de...@googlegroups.com
On 5/18/2013 3:54 AM, Nikolaos K. Dionysopoulos wrote:
You cannot override the View class, you can only override the view template files (inside the tmpl directory of each view). The view class is designed to pass all the necessary data to the view template file.

That said, there's a neat trick. The view template files are actually included by the view class. This means that you can use $this in those files and you're talking directly to your View class. Maybe that's all you need in your case.
hehe ur so smart nik :P
Bear

Reply all
Reply to author
Forward
0 new messages