?
avatar Scrabble96
Scrabble96
1 Sep 2020

Problem identified

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.

Proposed solution

If it is redundant, remove the file and the reference to it in templateDetails.xml

Open questions

avatar Scrabble96 Scrabble96 - open - 1 Sep 2020
avatar joomla-cms-bot joomla-cms-bot - change - 1 Sep 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 1 Sep 2020
avatar Scrabble96 Scrabble96 - change - 1 Sep 2020
The description was changed
avatar Scrabble96 Scrabble96 - edited - 1 Sep 2020
avatar chmst
chmst - comment - 1 Sep 2020

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.

avatar Scrabble96
Scrabble96 - comment - 1 Sep 2020

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.

avatar chmst
chmst - comment - 1 Sep 2020

If you have a component, for example, you don't want to have the complete tempate in your printed page.

avatar Hackwar
Hackwar - comment - 1 Sep 2020

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.

avatar Bakual
Bakual - comment - 1 Sep 2020

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.

avatar Bakual
Bakual - comment - 1 Sep 2020

I see Hackwar was a bit faster ?

avatar brianteeman
brianteeman - comment - 1 Sep 2020

It is not a new feature. It has been present since joomla 1.0

avatar Scrabble96
Scrabble96 - comment - 1 Sep 2020

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.

avatar Scrabble96
Scrabble96 - comment - 1 Sep 2020

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.

avatar infograf768 infograf768 - change - 1 Sep 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-09-01 14:13:35
Closed_By infograf768
avatar infograf768 infograf768 - close - 1 Sep 2020
avatar infograf768
infograf768 - comment - 1 Sep 2020

Closing as not a bug.

avatar N6REJ
N6REJ - comment - 2 Sep 2020

good thing to put into the docs. Perhaps someone who knows its behavior well can write it up.
@chmst know who that would be?

Add a Comment

Login with GitHub to post a comment