1
dx6angel
templates vs blocks
  • 2005/1/20 20:32

  • dx6angel

  • Just popping in

  • Posts: 8

  • Since: 2004/11/30


Hi

I am using the catads module and my own theme.
There is a block in the module that I would like to appear on the index page of the module.

Only, all blocks appear above any content scripted on the template page (catads_index.html) of the index.php page.

How can I manipulate the placements of blocks on pages with specific content on them already?

2
dx6angel
Re: templates vs blocks
  • 2005/1/20 20:49

  • dx6angel

  • Just popping in

  • Posts: 8

  • Since: 2004/11/30


Quote:
Themes are just smarty scripts. In terms of operational flow, I suppose it could be broken down like this:

XOOPS core determines if user requests a page within a module.

It then retrieves the module meta data using XoopsModuleHandler.

Retrieves all blocks visible to the current user, in the current module.

Each block is processed in succession, first the PHP code for the block is executed, returning an array of variables which are combined with the defined block templates in the smarty template layer. These blocks are then sorted into their various location based groups (left, right, center, etc)

Next the php code for the requested module page is executed, resulting in additional variables assigned to the smarty template layer, which combines them with the defined page template (again by the smarty template layer)

Once page processing is complete, the core takes the various rendered pieces (the blocks, the module content) and plugs them into the theme.

Reference (Ackbarr forum answer)


Does that mean I would have to recode some of the core?
Sounds daunting...
Suggestions?

3
tjnemez
Re: templates vs blocks
  • 2005/1/20 21:02

  • tjnemez

  • Home away from home

  • Posts: 1594

  • Since: 2003/9/21


the order of content versus blocks is determined in theme.html

edit: as catads is a module the catads_index.html will be displayed as content, so if you theme.html dispalys blocks before content... you guessed it.

4
dx6angel
Re: templates vs blocks
  • 2005/1/20 21:09

  • dx6angel

  • Just popping in

  • Posts: 8

  • Since: 2004/11/30


Quite right you are.

I have looked at that page 2309856739486 times and missed the little
<div id="content">
<{$xoops_contents}>
</div>
at the bottom.

Thank-you.

Login

Who's Online

183 user(s) are online (118 user(s) are browsing Support Forums)


Members: 0


Guests: 183


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