Difference between revisions of "JomSocial Templates"

(Created page with "==Overview== JomSocial templates are probably the most important part of the component and at the same time, most widely customized as well as most misunderstood facility of t...")
 
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
==Overview==
 
==Overview==
JomSocial templates are probably the most important part of the component and at the same time, most widely customized as well as most misunderstood facility of the extension, so, in this tutorial, we will try to explain the template purpose, what does it do, and also, shed some lights on most common misconceptions.
+
JomSocial templates are probably the most important part of the component and, at the same time, the most widely customized as well as most misunderstood facility of the extension; so, in this tutorial, we will try to explain the template's purpose, what does it does, and, also, shed some light on the most common misconceptions.
  
 
==Component Template==
 
==Component Template==
Every decent Joomla Component today have its own template. While this indeed could potentially increase the time or even the costs of the site development as Administrator have to adopt numerous templates to have visually same look, it is the '''only''' proper way to layout the component and its endorsed by Joomla! <br/>
+
Every decent Joomla Component today has its own template. While this indeed could potentially increase the time or even the cost of the site development - since the Administrator has to adopt numerous templates that have visually the same look - it is the '''only''' proper way to layout the component and that is endorsed by Joomla. Having a component template allows us to divide the '''look''', from the source code, and provides an easy way to customize the visual appeal of the component without worries that our customizations will be lost with component updates.
Having a component template, allows us to divide the '''''look'''''', from the source code, and provides easy way to customize the visaul appeal of the component without worries that our customizations will be lost on component update.
+
 
 +
==Template Compatibility==
 +
In theory, component templates should provide the compatibility layer between the two releases in the same branch but, more often than not, this is not the case in practice - especially with a complex component such as JomSocial. JomSocial, at this point, is by its view-structure, is probably the most complex component available at the Joomla Extension Directory and this complexity requires a lot of template files and a lot of '''views'''. To illustrate how complex the JomSocial template structure is, it is enough to look at any other component and see how many views the respective component has, and then come back to JomSocial and try to count the number of views it contains.
 +
 
 +
==What are Views?==
 +
The integrated part of the Joomla MVC framework. The "V" in MVC stands for Views. Basically, every page in Joomla must have its own view that determines how that page is viewed by its visitor.<br/><br/>
 +
For example, in JomSocial, there are the Frontpage, Registration, Profile, Group, Search, Event, Photo, and Video Views, etc.. To make things even more complex, every view can be extended with tasks; for example, in profile view, we have tasks to edit, delete, change preferences, set privacy, etc. - and, yes, all these require separate template files to provide the visual output of the features available.
 +
 
 +
== See Also==
 +
* [[Changing Default Template]]
 +
* [[Customizing Template]]

Latest revision as of 03:32, 13 April 2015

Overview

JomSocial templates are probably the most important part of the component and, at the same time, the most widely customized as well as most misunderstood facility of the extension; so, in this tutorial, we will try to explain the template's purpose, what does it does, and, also, shed some light on the most common misconceptions.

Component Template

Every decent Joomla Component today has its own template. While this indeed could potentially increase the time or even the cost of the site development - since the Administrator has to adopt numerous templates that have visually the same look - it is the only proper way to layout the component and that is endorsed by Joomla. Having a component template allows us to divide the look, from the source code, and provides an easy way to customize the visual appeal of the component without worries that our customizations will be lost with component updates.

Template Compatibility

In theory, component templates should provide the compatibility layer between the two releases in the same branch but, more often than not, this is not the case in practice - especially with a complex component such as JomSocial. JomSocial, at this point, is by its view-structure, is probably the most complex component available at the Joomla Extension Directory and this complexity requires a lot of template files and a lot of views. To illustrate how complex the JomSocial template structure is, it is enough to look at any other component and see how many views the respective component has, and then come back to JomSocial and try to count the number of views it contains.

What are Views?

The integrated part of the Joomla MVC framework. The "V" in MVC stands for Views. Basically, every page in Joomla must have its own view that determines how that page is viewed by its visitor.

For example, in JomSocial, there are the Frontpage, Registration, Profile, Group, Search, Event, Photo, and Video Views, etc.. To make things even more complex, every view can be extended with tasks; for example, in profile view, we have tasks to edit, delete, change preferences, set privacy, etc. - and, yes, all these require separate template files to provide the visual output of the features available.

See Also