Difference between revisions of "Site (Application)"

From Joomla! Documentation

(Marked this version for translation)
(Some markup changes.)
 
Line 2: Line 2:
 
<translate>
 
<translate>
 
<!--T:1-->
 
<!--T:1-->
The '''Site''' [[S:MyLanguage/application|application]], also known as the '''''Front-end''''', is the main part of a Joomla website. This is where the general traffic occurs: when a visitor uses your site, he will be using the Site application. You can manipulate this (add/remove [[S:MyLanguage/content|content]], [[S:MyLanguage/Switching templates|switch templates]] etc.) from the [[S:MyLanguage/Administrator (Application)|Administrator application]]. Users with appropriate [[S:MyLanguage/:Category:Access Control|access levels]] will also be able to edit some aspects of the site from the Front-end.
+
The '''Site''' [[S:MyLanguage/application|application]], also known as the '''Frontend''', is the main part of a Joomla website. This is where the general traffic occurs. When visitors come to your site, they will be using the Site application. You can manipulate this (add/remove [[S:MyLanguage/content|content]], [[S:MyLanguage/Switching templates|switch templates]] etc.) from the [[S:MyLanguage/Administrator (Application)|Administrator application]]. Users with appropriate [[S:MyLanguage/:Category:Access Control|access levels]] will also be able to edit some aspects of the site from the Frontend.
  
 
<!--T:2-->
 
<!--T:2-->
The Site application is implemented in the JSite class, which is a subclass of the generic JApplication. The JSite object can be retrieved in all versions that support JSite using the following code. The variable <code>$app</code> will be a JSite object when this code is run in the Site application.
+
The Site application is implemented in the JSite class, which is a subclass of the generic JApplication. The JSite object can be retrieved in all versions that support JSite using the following code. The variable ''$app'' will be a JSite object when this code is run in the Site application.
 
</translate>
 
</translate>
  
 
<translate>
 
<translate>
 
<!--T:3-->
 
<!--T:3-->
<source lang="php">$app = JFactory::getApplication();</source>
+
<syntaxhighlight lang="php">$app = JFactory::getApplication();</syntaxhighlight>
 
</translate>
 
</translate>
  

Latest revision as of 15:25, 2 October 2022

Other languages:
Bahasa Indonesia • ‎Deutsch • ‎English • ‎Nederlands • ‎español • ‎français • ‎中文(台灣)‎

The Site application, also known as the Frontend, is the main part of a Joomla website. This is where the general traffic occurs. When visitors come to your site, they will be using the Site application. You can manipulate this (add/remove content, switch templates etc.) from the Administrator application. Users with appropriate access levels will also be able to edit some aspects of the site from the Frontend.

The Site application is implemented in the JSite class, which is a subclass of the generic JApplication. The JSite object can be retrieved in all versions that support JSite using the following code. The variable $app will be a JSite object when this code is run in the Site application.

$app = JFactory::getApplication();

Example[edit]

An example Home Page, the first page of the Site application