1
BobbyC
Themes vs. Templates
  • 2003/11/18 21:02

  • BobbyC

  • Just popping in

  • Posts: 29

  • Since: 2003/11/16


This has probably been covered a million times so sorry but I couldn't figure out how to search the posting in the nanosecond I have to solve that problem.

Anyway. What exactly is the difference? Is the a good primer on customizing the look and feel of the site? Is there a set of "container files" which specify the layout and in which one places XOOPS tags?

Bob

2
builderb
Re: Themes vs. Templates
  • 2003/11/18 21:08

  • builderb

  • Not too shy to talk

  • Posts: 137

  • Since: 2003/8/4 2


basically a template is how the page is layed out and the theme is what makes it visually appealing.

I'll use a home analogy to describe the differences...

A Theme is the carpet, drapes, pictures, etc.

A template is the floorplan.

I hope that makes sense.

-B

3
ackbarr
Re: Themes vs. Templates

Try this article on for size:
http://wiki.xoops.org/wakka.php?wakka=ThemesVsTemplates

In short - themes and templates both try to do the same thing. That is, they both modify how content is rendered to a user. The difference between them is scope. A theme modifies how a base XOOPS page is rendered, and templates modify how specific page content or blocks are rendered within that page.

4
BobbyC
Re: Themes vs. Templates
  • 2003/11/18 21:44

  • BobbyC

  • Just popping in

  • Posts: 29

  • Since: 2003/11/16


OOOkay. So if I wanted to move from a tables-based layout to a totally css model, I'd be manipulating the Templates? And if I wanted to change the fonts, heading sizes/styles and colors, I'd be manipulating the themes?

Bob

P.S., Actually, I read the suggested article yesterday but did so VERY quickly. Perhaps I'll spend more time with it.

5
sunsnapper
Re: Themes vs. Templates

Here's another way to look at it.

Themes control the "wrapper" for your site... the basic layout as it appears on every page. Templates control the presentation of information from modules.

If you are wanting to eliminate tables from your layout, I think you will spend most of your time with the theme.html file for the theme in question.

When you start looking at templates, you will find that most of those already use <div> for everything. (An exception might be a module that produces tabular data... a legitimate use for tables).

So the html files for the theme would be the ones to hit. These are found in the subdirectory for your theme. theme.html etc. As you move things from tables to div for layout, you will want to add an appropriate div class to your CSS file to style and position your layout div blocks.

(CSS defines styles for both themes and templates. Kind of a side issue. Most if not all of the colors, fonts, margins and widths, etc., should be controlled in the CSS, ideally. It is worth mentioning that when you download a theme created by someone it includes the CSS file, so the CSS is "part" of the theme... but, the styles in the file do impact the way template content looks.)

I hope that helps.

6
BobbyC
Re: Themes vs. Templates
  • 2003/11/19 0:34

  • BobbyC

  • Just popping in

  • Posts: 29

  • Since: 2003/11/16


I reread the bit on themes vs. templates and also downloaded the default themes and opened them up with my favorite html editor. With my own research and your explanation, a gilmmer of understanding is dawning on the dark side of my grey-matter. The only thing I'm puzzling about now is where to change the logo url.

7
sunsnapper
Re: Themes vs. Templates

I would say, don't change the logo url. Instead, change the file that the url points to. That way, your theme will be compatible with other XOOPS users if your ever decide to release your theme (or a variant). Likewise, it will make it easier for you to switch to other third-party themes if you get in this mode of thinking.

In other words, the theme typically points to an image file at
http://yourwebsite.com/themes/yourthemename/logo.gif

If you want the file to be something other than a gif (png, jpg, etc.) then you might want to make that change. It is in the theme.html

But, conceptually, I suggest changing the image file instead of the theme.html for updating the logo.

8
BobbyC
Re: Themes vs. Templates
  • 2003/11/19 14:33

  • BobbyC

  • Just popping in

  • Posts: 29

  • Since: 2003/11/16


Thanks. I understand theme structure better and also what {$xoops_imageurl} means as it relates to "logo.gif."

Login

Who's Online

182 user(s) are online (127 user(s) are browsing Support Forums)


Members: 0


Guests: 182


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits