I can't see what function this file provides. Adding code to it makes no difference, such as adding a test class or an extra div:
<body class="<?php echo $this->direction === 'rtl' ? 'rtl' : ''; ?> test">
<jdoc:include type="message" />
<jdoc:include type="component" />
<div>This is a test div in the component.php file</div>
</body>
Deleting the content of the component.php file has no effect on the rendering of Cassiopeia, at least for a standard single article item or a category blog item.
If it is redundant, remove the file and the reference to it in templateDetails.xml
Labels |
Added:
?
|
It enables users to show the pure content without Headings, modules and other template elements.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30538.
Do you mean by replacing the index.php code with the component.php code? I guess that would work for a single-page site but it wouldn't show a menu.
If you have a component, for example, you don't want to have the complete tempate in your printed page.
You can add ?tmpl=component to any URL and only get the output that would be generated by the component.php. You can actually put any php file in the root of your template and then add ?tmpl= and get that rendered. That file is definitely needed and not redundant.
If you append ?tmpl=component
to any URL, it will use the component.php instead of the index.php. You can also add other entry points if you want but component is used by the system and expects to only render the output of the component (without menus, modules, ...).
Most used usecase is probably modals.
I see Hackwar was a bit faster
It is not a new feature. It has been present since joomla 1.0
If you append
?tmpl=component
to any URL, it will use the component.php instead of the index.php. You can also add other entry points if you want but component is used by the system and expects to only render the output of the component (without menus, modules, ...).
Most used usecase is probably modals.
Ah, I see, so used for printing pop-ups etc. Thank you.
It is not a new feature. It has been present since joomla 1.0
I didn't think it was new, just wondered what it actually did. Now I know.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-09-01 14:13:35 |
Closed_By | ⇒ | infograf768 |
Closing as not a bug.
It enables users to show the pure content without Headings, modules and other template elements.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30538.