What I did
I created an alternative menu item for com_wrapper. The steps:
1) Copy from /components/com_wrapper/views/wrapper/tmpl the files default.php and default.xml.
2) Paste them in /templates/[template_name]/html/com_wrapper/wrapper
3) Rename them to custom.php and custom.xml
4) Edit custom.xml, changing title="COM_WRAPPER_WRAPPER_VIEW_DEFAULT_TITLE" on line 3 with title="custom"
5) In Joomla's backend, create a new menu item and choose type Wrapper => custom. Publish the menu item.
What happened
Changes to the custom.xml file get applied to the backend page for the alternative menu. But changes in the custom.php file do not get applied to the frontend page for that menu. It appears that the PHP file is not parsed at all because even obvious syntax errors do not have any effect. (Just to note, when editing /components/com_wrapper/views/wrapper/tmpl/default.php, changes do get applied.)
What should have happened
Changes in the custom.php file should be applied to the frontend page for the alternative menu item.
Other information
I believe this is a common problem. See here ( http://joomla.stackexchange.com/questions/4388/list-all-categories-com-content-views-categories-alternative-layout-not-workin ) for a clear and concise example, and here ( http://forum.joomla.org/viewtopic.php?f=579&t=578662 ) for a longer thread with many people reporting issues along these lines.
My environment
Joomla 2.5.24. XAMPP 1.8.3 on Win7. PHP 5.5.6, MySQL 5.6.14, Apache 2.4.7
I'd be happy to provide any other info if needed. Alternative overrides are a really important functionality. :)
Labels |
Added:
?
|
Category | ⇒ | Components Front End |
Status | New | ⇒ | Confirmed |
Labels |
Added:
?
|
We are working on this at Butterfly!
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4341.
changed JRequest::getCmd('layout', 'default') to JRequest::getString('layout', 'default') at JController.
getCmd removes colons(:) which are required for template overrides to work
This should be now working with any type of component template overwrite
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4341.
Status | Confirmed | ⇒ | Closed |
Rel_Number | ⇒ | 4724 | |
Relation Type | ⇒ | Related to |
Set to "closed" on behalf of @brianteeman by The JTracker Application at issues.joomla.org/joomla-cms/4341
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-10-17 06:20:52 |
Labels |
Added:
?
|
I just tested it with the steps you said and added a
<h3>test</h3>
prior to the<div class="contentpane<?php echo $this->pageclass_sfx; ?>">
. It works fine in Joomla 3, but is indeed broken in 2.5.So I can confirm it for Joomla! 2.5.25.