home


Top
   Info
   Internet News
   Poll Archive
   Contact
   Site Map
Smarty Textblock pagination

Usage:

PHP PART:
$smarty->assign('myarticle','first page contents<NEWPAGE>second page contents <NEWPAGE>ETC');
TEMPLATE:
{paginate script_name="$SCRIPT_NAME" get_params=$smarty.get} $myarticle {/paginate}

* $SCRIPT_NAME & $smarty.get are required in order to create links.
* $split_name is optional parameter: defines the string separator used in this plugin to split article in smaller chunks (default -> "<NEWPAGE>")
*$page_name - optional parameter: how do you want your pages to be called (default -> "page")

If you want to split your article using <LDFJSLDS> instead of <NEWPAGE> and want for pagination to use "row" instead of default "page" - then use it as follows:

{paginate script_name="$SCRIPT_NAME" get_params=$smarty.get split_name="<LDFJSLDS>" page_name="row"}
 first page content<LDFJSLDS>second page content <LDFJSLDS> third page content and so on
{/paginate}

 


1[2]
spacer