? ?
avatar smehrbrodt
smehrbrodt
28 May 2016

It would be helpful if one can override the view.html.php, view.feed.php etc. in the template.

This plugin allows that, but this could be part of the core.

See also https://docs.joomla.org/How_to_override_the_component_mvc_from_the_Joomla!_core

avatar smehrbrodt smehrbrodt - open - 28 May 2016
avatar smehrbrodt smehrbrodt - change - 28 May 2016
Title
Feature request: Allow overriding view.
Feature request: Allow overriding view.*.php
avatar smehrbrodt smehrbrodt - change - 28 May 2016
Title
Feature request: Allow overriding view.
Feature request: Allow overriding view.*.php
avatar smehrbrodt smehrbrodt - change - 28 May 2016
The description was changed
avatar brianteeman brianteeman - change - 28 May 2016
Category Feature Request
avatar brianteeman brianteeman - change - 28 May 2016
Labels Added: ?
avatar brianteeman
brianteeman - comment - 28 May 2016

Personally speaking as a free extension exists to do what you ant I dont see the benefit of adding it to the core


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10650.

avatar smehrbrodt
smehrbrodt - comment - 28 May 2016

Well the extension is unmaintained and buggy. I tried it and could override my rss feed, but it broke the other view (view.html.php).

avatar chrisdavenport
chrisdavenport - comment - 28 May 2016

Overriding in the way suggested in architecturally unsound and likely to lead to fragile code and broken sites.

avatar smehrbrodt
smehrbrodt - comment - 28 May 2016

Ok, then maybe you have another suggestion.

My usecase is the following:
I have an extension (event management) that offers me an RSS feed in view.feed.php.
I want to modify the content of the RSS feed (e.g. not show the date + time in the content).

How can I override the default output? There are no layouts involved.

avatar JoomliC
JoomliC - comment - 28 May 2016

@smehrbrodt Did you ask first to the extension's developer ?
As it could be a feature request for this extension ;-)

About Joomla, what could be a feature request, would be the creation of a jlayout for rss feeds maybe ?...

avatar Bakual
Bakual - comment - 28 May 2016

The way the feed works, it doesn't need or support a layout.
Maybe it makes sense to add options to it, but I don't think overriding the view file is the answer.
Or maybe just create your own view instead (may need an own extension of course).

avatar brianteeman brianteeman - change - 28 May 2016
Labels Added: ?
avatar mbabker
mbabker - comment - 28 May 2016

If you get access to the controller singleton instance you can add paths to the internal lookup via JControllerLegacy::addViewPath(). The problem is because JControllerLegacy::getInstance() only supports a single singleton instance for the entire request (as in you can't use it to get instances of multiple controllers, major MVC layer flaw) in your plugin where you set this additional path lookup (because you'll have to do it before the component is triggered because the next plugin event is going to be after the view is loaded and being rendered generally, if not after the view is rendered) you need to ensure you're doing the right checks to not cause the wrong controller to be loaded in first.

avatar brianteeman
brianteeman - comment - 3 Aug 2016

Closed


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10650.

avatar brianteeman brianteeman - change - 3 Aug 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-08-03 10:35:53
Closed_By brianteeman
avatar brianteeman brianteeman - close - 3 Aug 2016
avatar smehrbrodt
smehrbrodt - comment - 10 Aug 2016

Closed

Why? This is a feature request.

avatar brianteeman
brianteeman - comment - 10 Aug 2016

For the reasons stated by @bakual and @mbabker

Add a Comment

Login with GitHub to post a comment