1
zer0fill
Can someone explain Blocks vs Templates in moduels (ie: newbb)
  • 2003/12/19 9:55

  • zer0fill

  • Not too shy to talk

  • Posts: 137

  • Since: 2003/12/2


Can someone explain Blocks vs Templates in moduels (ie: newbb). I'm having a really hard time understanding when to use blocks or just make another template file. I've already read the ModuleBasicStructure but there wasn't enough detail to get it though my skull

[edit]
oh, wait. lol. after looking at the main page, i think it just triggered that lightbulb over my head (and a face of shame for not seeing it earlier).

Blocks - Things on the homepage (ie: the most recent forum threads)

Templates - When you actually go into the module (ie: start browsing though the forum)

2
wammes
Re: Can someone explain Blocks vs Templates in moduels (ie: newbb)
  • 2003/12/19 10:51

  • wammes

  • Not too shy to talk

  • Posts: 101

  • Since: 2002/1/3 1


This is how I see it:


blocks are the elements on your site. On xoops.org you can see a lot of blocks. For example on your left side you see the blocks "General Information", "XOOPS Wiki" an "Miscellaneous". These are elements on your site that contain some content. Blocks can be placed in the left, right or center column.

Templates are little html files that contain information about how a block is displayed. Each block has his own template. That means you can change the way a block looks in the template of the block. Let's say we want to add an little arrow image in front of every item in teh XOOPS wiki block. For that you should modify the template of the XOOPS WIKI block and add the html code for that arrow image before all these items.

Modules also use templates. These templates contain information about how the module itself (or parts of the module) will look. A module can have blocks, like the "top posters" on the left. This block belons to the newbb module.

It's difficult to explain. But it is a very logic design...

Login

Who's Online

140 user(s) are online (91 user(s) are browsing Support Forums)


Members: 0


Guests: 140


more...

Donat-O-Meter

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

Latest GitHub Commits