Joomla include -- what and where is the file? - joomla

<jdoc:include type="modules" name="foot"/>
What file does the code above include in joomla and where is it located?
I have grep'ed a whole site for a string that I know has to be in the file called by that line of code... and I haven't found it.
Please help!

It's a template position called foot. The jdoc:include is the code used by the joomla framework to create the position for modules in the template. So if you publish a module in the position "foot", you see it appear in that place holder for the "foot" position.

Related

Explode Joomla Content?

I am creating a joomla template. In order to get the contents of a page I have this: <jdoc:include type="component" />
How can I explode this or add the contents of the component to a variable?
You can't and you shouldn't. The right way to modify the content before rendering it (assuming that's what you want to do) is to use content plugins or system plugins.
Especially the "onAfterRender" plugin allows you to pick the current body, edit as you wish, and then push it back, e.g.
$body = JResponse::getBody();
$modifiedBody = doSomethingWith($body);
JResponse::setBody($modifiedBody);
Instead, if you just want to change the default layout of any component, you should look at template override

Can I put a Joomla extension as the only item at frontend?

What I need to do is to put a Joomla extension, JDownloads, as the only item at the frontend. I mean, no menus, no header, no footer, no other things at frontend, only JDownloads.
I'm a newbie in Joomla, so I have to ask. Is this possible, at first place? If it is, how can achieve it?
Thanks!
No need to do anything other than make a single menu item to your JDownloads component. If you don't add any modules then all that will display is the component.
You could fork one of your templates (atomic is the simplest one) eg from
/templates/atomic
to
/templates/simply
tweak a few parameters in /templates/simply/templateDetails.xml
<name>atomic</name>
and in /templates/simply/index.php replace the contents of BODY tag with:
<jdoc:include type="message" />
<jdoc:include type="component" />
Then set it as your default template or use as helper for other site

Modifying joomla mod_banner to count banner

I'm using default joomla mod_banner.
I'd like to modify the module so can give specific css class for each banner image, so if the module displaying 3 banner images, the first banner (image) will have class="banner1", the second image will have class="banner2" the third image will have class="banner3" and so on.
How can I do that?
If you decide to modify your mod_banners module, then just follow the steps:
Open the /modules from your root directory.
Find the directory named mod_banners in modules/mod_banners
Find out the tmpl directory modules/mod_banners/tmpl
default.php is the file that display the images into the frontend of you joomla website.
just edit this file. See the img tag into and just change whatever name you want to give the class..
UPDATE : Take a look on the given Codes:
// Add variable before
$unique_number = 1;
// Provide the Provides the images URL or related information
foreach($list as $item):
now just find out the <img tag and just add a class something like
<img class='banner-<?php echo $unique_number?>'
and at the end of the file findout the endforeach; and just add the code something like
<?php
$unique_number++;
endforeach;
?>
providing you the class name like banner-1, banner-2, .... etc.
IMPORTANT: If you notice on the top most of your default.php the module provide the images into an array, If you are familiar with the Joomla modules structures then you can modify it easily.

Default Article content position div in Joomla 2.5

I wish to show a Article's content on a Joomla template 2.5 page.
I have seen the use of the div ids 'wrapper' with another div 'main' inside that in the index.php page but that seems not to work.
Does normal article content require positions like modules? In the CMS I don't see anything in the Article Manager that allows me to specify a position?
Help please!
The articles are showed by default (or any other component content)where this tag is located in your template:
<jdoc:include type="component" />
Normal content does not require any position like modules.

Joomla position in a template

In Joomla, for any template that we use, we have a number of specified positions
( left, right, footer) .. Is it possible to include new position in the template which suits our choice ...
Yes, it is.
You need to add a div element in the place you need and insert joomla tag
<jdoc:include type="modules" name="yuor_position_name" style="xhtml" />
in it.
Than you need to add this position to your templateDetails.xml
Edit this file and add to the <positions> section one more thread like this:
<position>your_position_name</position>
and save the file. From now you will see this position in modules setup.
Good tutorial about Joomla 1.5 templates you can read here:
http://www.compassdesigns.net/joomla-tutorials/joomla-15-template-tutorial

Resources