MagicCMS Documentation

MagicPost..::..GetMiniaturePk Method (Int32, Int32, MagicPostWhichUrl)

Gets the miniature of a post. Create miniature if it doesn't exist.

Namespace:  MagicCMS.Core
Assembly:  MagicCMS.4.5 (in MagicCMS.4.5.dll)

Syntax


public int GetMiniaturePk(
	int width,
	int height,
	MagicPostWhichUrl which
)

Parameters

width
Type: Int32
The width of the miniature
height
Type: Int32
The height of the miniature
which
Type: MagicCMS.Core..::..MagicPostWhichUrl
Use main or secondary url of MagicPost (MagicPostWhichUrl)

Return Value

The unique id ([MagicCMS.Core.Miniature.Pk]) of existing or just created miniature.

Remarks


Miniature are created and stored in MagicCMS database table using images linked to the post trough Url and Url2 fields. If images or dimensions changes the miniature is recreated.