Adam 2009-01-30
Documentation » Printp
Prints and formats node data into valid XML/HTML tag. Use this to output node data. This function using fallback mechanism.
p('title', 'h1'); // printing node's title, if 'title' is empty it will take 'name' value
void p( string $name [, string $tag = false, bool|string $link = false, int $options = O_ESCAPE_ALL] )
Parameters
- string $name Name of the field
- string $tag XML/HTML tag to wrap the data to in the form of tag.class#id (where .class and #id are optional)
- bool|string $link Non-false to wrap the data to the link to the data, string for MORE link with text $link
- int $options Options for formatting
Constants
- O_ESCAPE_ALL Escape all XML/HTML entities
- O_ESCAPE_CONFIG Escape XML/HTML entities not allowed by $cms_html_tags config setting
- O_PRINT_EMPTY Print empty data as '-' instead of skipping the output
- O_C_ESCAPE Escape / add slashes in C-way
- O_ESCAPE_URL Escape characters for URL
- O_SMILIES Process smilies as defined in the config $cms_smile_format and $cms_smilies
- O_CDATA Wrap data into XML CDATA
- O_GMT Print date/time in GMT format
- O_DATE Print only date of date/time value
- O_STRIP_TAGS Strip all HTML tags and turn some of them into text
- O_ABSOLUTIFY Absolutify URLs of images and links
- O_EVAL Evaluate all capital letters like constants (i.e. MYVALUE)
Last edited 2009-02-24 16:40:27
