Skip to Content
Designing for XOOPS
book

Designing for XOOPS

by Sun Ruoyu
July 2011
Beginner to intermediate
124 pages
2h 26m
English
O'Reilly Media, Inc.
Content preview from Designing for XOOPS

Chapter 6. Module Template Override

You may wonder how a basic XOOPS theme can be so small in size. It’s because XOOPS themes only set the overall styles and block layout. But XOOPS-powered websites are more than that, because they are equipped with many modules. Modules are a special feature of XOOPS, which makes it highly extendable. Modules work like plug-ins to some extent, but they are far more powerful. Actually, the XOOPS core system can be viewed as a basic module.

Then there is a problem: how do you deal with the themes for different modules? XOOPS themes only set the basic styling and block layout, and allow specific modules to have their own templates—even styling—provided that the stylesheets will not clash.

Since we are now on the topic, I should pause to explain the difference between a theme and a template.

A theme in XOOPS sets the style of an entire XOOPS website. The stylesheet will be applied to the whole website, including all the modules. The theme also sets block layout.

A template in XOOPS sets the layout of a specific part of XOOPS. The specific part can be block content, a module page, or a forward page.

Here are some further insights into themes and templates in XOOPS:

  • A theme sets the layout of blocks; a template sets the layout in each of the blocks.

  • A theme sets the style of a module page; a template sets the layout of the module page.

  • A theme can be seen as a template of XOOPS blocks.

  • A theme resides in /XOOPS/theme, while a template resides in modules/MODULE_NAME/templates/ ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Getting Started with Fluidinfo

Getting Started with Fluidinfo

Nicholas J. Radcliffe, Nicholas H. Tollervey
Java™ Phrasebook

Java™ Phrasebook

Timothy Fisher

Publisher Resources

ISBN: 9781449309534Errata Page