show

show is used as a parameter to section. show is a boolean value, true or false. If false, the section will not be displayed. If there is a sectionelse present, that will be alternately displayed.

Example 7-29. section attribute show

	{* $show_customer_info may have been passed from the PHP

	application, to regulate whether or not this section shows *}

	{section name=customer loop=$custid show=$show_customer_info}

	{$smarty.section.customer.rownum} id: {$custid[customer]}<br>

	{/section}



	{if $smarty.section.customer.show}

	the section was shown.

	{else}

	the section was not shown.

	{/if}





	OUTPUT:



	1 id: 1000<br>

	2 id: 1001<br>

	3 id: 1002<br>



	the section was shown.