PostNuke Help

Previous
Table of Contents

Home
up

Next
pnBlockLoad


pnBlockGetInfo

get block information

Synopsis

array pnBlockGetInfo(bid);

Description

pnBlockGetInfo() returns an array of Block information.

Parameters

bid
The id of this block in the PostNuke system.

Return Values

This function returns an array of block information or void if an exception was raised.

Exceptions

This function raises BAD_PARAM if you pass an invalid parameter. This function raises DATABASE_ERROR if an error occurs while querying data. This function raises ID_NOT_EXIST if the block is unknown.

Notes

The block information array contains the following items:

bkey
title
The display title of the block
content
The container for block content. Serialized using pnBlockVarsFromContent() and pnBlockVarsToContent().
url
The url for blocks that depend on URLs, like a rss headlines block.
position
The position of the block, currently one of 'l' (left), 'r' (right), 'm' (middle). This is likely to change in later versions to make placement more flexible.
weight
The weight of the block, used for vertical placement of blocks.
active
The status of a block, '1' for active, '0' for inactive.
refresh
Indicates if a block should be refreshed. Examples would be headline blocks that fetch external content regularly.
last_update
The date and time of the last refresh of the block.
language
The language of the block.
mid
The ID of the module a block belongs to. '0' indicates a block belonging to the core.

Examples

// Get information on block
$blockinfo = pnBlockGetInfo($bid);

Previous
Table of Contents

Home
up

Next
pnBlockLoad