Understanding the xSwatch4 theme

Themes 28705
Author
Alain
Publication
09/13/2021
09/13/2021
Update
11/03/2021
Rating
4.7 (3 votes)
Level
Advanced
Understanding the xSwatch4 theme

Understanding the xSwatch4 theme Choose the xSwatch4 theme for your website and arrange it exactly as you wish.

This very detailed tutorial will explain how this theme is structured and will guide you step by step to adapt it to your needs.


Module template overloads

Finally, we'll end this long tutorial by introducing you to a benefit of the xSwatch4 theme that is the overloading of modules templates.
These overloads of templates of modules, realized in Bootstrap4 guarantee you a totally responsive (adaptive) design, whatever the displayed pages of modules.
The overload system in XOOPS is a feature that allows the web designer to replace / modify a template of a module without modifying the original module files. Thus, when the module is updated, the modification work will not be overwritten.

A tutorial dedicated to the overload system in XOOPS will be made soon.
Understanding overloads in XOOPS
This tutorial is not yet available.


1. Overview and usage
You will find the modules template overloads under the /themes/xswatch4/modules folder from the root of your site.

modules

contact (Contact Us)

extcal (Schedule)

newbb (Forum)

obituaries

pm (Private Messages = intrenal messages)

profile (Profiles management)

publisher (Publishing Solution)

system (XOOPS System)

tag (Words Cloud)

tdmdownlads (Download section management)

wggallery (Album and gallery images management)

xmcontact (Contact Ust)

xmcontent (Content management)

xmdoc (Attachment management)

xmnews (News management)

xmsocial (Social links + voting management)

xoopsfaq (FAQ management)

index.php

This means that if you use any of these modules, your website will use these overloads and therefore display the pages of these modules in a responsive manner.
You don't have to do anything else, everything is already set up!
Of course, before doing so, you will have followed the recommendations in step:
"Template theme.tpl - Requirements" / "6. Template modifications"

1a. Structure of overloads of a module
The overload structure of a module is always the same.
We will take as an example the article management module xmnews.
As seen previously, we will therefore find the overloads of this module in the folder:
/themes/xswatch4/modules/xmnews.

xmnews

blocks

index.php

xmnews_block.tpl

xmnews_block_carousel.tpl

xmnews_block_title.tpl

xmnews_block_waiting.tpl

index.php

xmnews_action.tpl

xmnews_article.tpl

xmnews_index.tpl

Under the folder xmnews, there are the overloads of the templates of the module pages, on the user side.
Under the folder xmnews/blocks, we find the of the templates of the modules blocks.

1b. Examples
The name of the templates is often quite telling.
xmnews_block.tpl: Template of the block that displays the News,
xmnews_block_carousel.tpl: Template of the block that displays the carousel,
xmnews_article.tpl: Template that displays an News,
xmnews_index.tpl: Template that displays the module index (list of News summaries).



2. Modifications and additions to overloads
You have the ability to modify existing overloads.
If you are using other modules than those listed in the /themes/xswatch4/modules folder, you can in this case add module template overloads by creating a folder with the name of the module and following the expected structure.

The tutorial Understanding Overloads in XOOPS will go into more detail on these points.