Components

Last update by Elxis Team

Component is the most important Elxis extension type.

Components are the most important Elxis applications. Components are the extensions that actually generate the page's main output and handle the user's request. Other extensions such as modules, plugins, search engines and authentication methods have only a help role in Elxis. If you take a look at an Elxis generated page the component's output will be the one in the center of the page. Modules are like widgets being displayed in the left or right column or even on the site's top and bottom sections. If, for example, a user has requested to see an article Elxis will display it in the center of the page and this will be the output of a specific component that handled that request, component Content. Now that we are able to locate components output on a page let's see some more interesting things about them.

One component per time

When you are on a site and select to see an article, or you browse a category, or you perform a search, or you do anything else, you always perform one action per time. That action can be triggered by clicking a link or submitting a form. Depending on the action you pick Elxis calls a component to handle your request. Components are speciliazed applications. Elxis will call the component that is able to handle your specific request. For instance if you decide to edit your user profile Elxis will call component User. Component User then will show you your profile editing form. So, every time, on any request, on any case, Elxis will call a component to handle your request. There can be only one active component per page!


Powerful applications

Components are really powerful and provide super extra functionality to Elxis CMS. A developer can create a component doing what ever he likes. For instance someone may create a specialized component for showing football match results with navigation between various competitions, game results, match reports, team and player statistics, etc. Components are so powerful that they can even have their own extensions. As Elxis has components and modules as extensions, a component can have its own extensions. Plugins for example are extensions of component Content. Search engines are extensions of component Search. Authentication methods are extensions of component User.


Physical location

Components can be found under folder components/ in Elxis file-system. Each component is placed inside a folder with the com_ prefix followed by the component's name. For instance component's Search files are located in the path shown below.

components/com_search/

The files that consist a component are up to the component's developer but all components have at least a PHP file used as router and an XML file containing some information about the component (author, version, parameters, etc).

components/com_search/search.php
components/com_search/search.xml

Install, uninstall, update and sunchronize components

install extensions in Elxis As for any other extension type, components can be installed via the Elxis extensions manager. To install a component select a ready to install component package (com_xxx.zip) from your computer and click install. To update a component do the same. Elxis will detect that the uploaded package is a newer version of the already installed component and perform an update instead. On sub-sites instead of install there is a synchronize option. Select the component you want to use from the list of available components on the mother site and click synchronize. The component will become available in the sub-site too. An alternative method, even simpler, to install or update a component is via EDC. EDC browser allows you to browse available extensions on real time from your Elxis administration section. Just click the Install or Update button on the extension you are interested in and Elxis will download and install (or update) this extension for you automatically. To Uninstall a component select Extensions -> Components from the Elxis administration menu, highlight the component you want to remove and click Uninstall.

 

Manage components

third party components After installing a third party (not built-in) component a menu pointing to that component is generated in Elxis administration menu under Extensions. Click on that menu item to go to the component's administration main page. The contents of that page and any further administration pages are up to the component's developer.

To see the list of the installed components navigate to Extensions -> Components. Highlight a row and click Edit to edit a component. Click the Parameters tab, most components have configuration options called parameters. Through this page you can configure individual options for the component. These options vary depending on the component. From the first tab you can also re-route the component if you like. By re-routing a component you alter its base URL element. When ready click Save to save your settings.

Component's Search default URLs:
http://www.example.com/search/...

After re-routing component Search to "find" its URLs will become:
http://www.example.com/find/...
 

Access

The default ACL values for accessing components are:

  • Install/Update/Uninstall/Synchronize a component: Only administrators are allowed (group id = 1)
  • Manage a component from the administration section: Access level 70 and up (managers, administrators)
  • Edit a component's parameters: Access level 70 and up (managers, administrators)
  • View component's frontend section: Access level 0 and up (everyone) except for special components that have no frontend section.

It has been read 7577 times
Modules
Previous article
Modules