-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Hi,
and thanks for that plugin, i tried to write my own to override view.html.php, and i didn't succeed.
So i installed yours, but it is limited to administration side.
Could you tell how to use it for frontend side and to another view (category) ?
I changed layout.php as:
function onAfterInitialise(){
var_dump(JFactory::getApplication()->input->get('option', '', 'cmd'));
/** Set criteria for the View you want to override */
if (JFactory::getApplication()->input->get('option', '', 'cmd') == 'com_content'
&& JFactory::getApplication()->input->get('view', '', 'cmd') == 'category'
&& JFactory::getApplication()->input->get('layout', '', 'cmd') == 'blog'
) {
/** Override JRequest View and Layout - register the view (example in the layout/com_content folder) */
JRequest::setVar('view', 'article2');
JRequest::setVar('layout', 'blog2');
JLoader::register('ContentViewArticle2', __DIR__ . '/com_content/views/article/ContentViewArticle2.php');
}
}
}
But the var_dump never displays anything...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels