PostNuke Help

Previous
User Functions

Home
up

Next
Document Your Module


Writing Blocks

You might want your module to include blocks. Blocks are smaller functional units of a module that display specific information, and generally show up down the left and right hand sides of a page. Blocks are relatively simplistic items, and can either use their module's API functions to obtain information or use their own direct SQL query. Although they are packaged as part of the module they are not directly related to it except that they use the same database tables, and as such they might have to load the module's database table information directly through the use of the pnModDBInfoLoad() function if they intend to access the module's tables directly.

An annotated copy of the template first.php block file is available in the standard PostNuke distribution as part of the Template module.

Testing Your Blocks

Once the blocks are in place they should be tested by displaying them through the Blocks administration system. The blocks should be checked against the database and the user functions to ensure that they are displaying the data correctly.


Previous
User Functions

Home
up

Next
Document Your Module