Loading...
 
Skip to main content

Features / Usability


You are viewing a reply to How to print all wiki pages in a category?

SOLUTION: Re: How to print all wiki pages in a category?

OK, so it wasn't as hard as I thought. 😡

Basically, you simply need to build an array of all the pages, then pass it to the tiki-print_pages.php. I added the following code to the cateobjects.tpl template:
<form action="tiki-print_pages.php" method="post"> <input type="hidden" name="printpages" value='a:{$i|@count}:{literal}{{/literal}{section name=o loop=$i}i:{$smarty.section.o.index};s:{$i[o].name|count_characters inclue_spaces=true}:"{$i[o].name}";{/section}{literal}}{/literal}' /> <input type="submit" name="printarticles{$title}" value="{tr}Print All {$title} Articles{/tr}" / </form>

Now, when I use the {CATEGORY} plugin, I get a button that will pre-load all the wiki pages into the Selected Pages area of the multi-print (tiki-print_pages.php) page. If your category includes objects in addition to wiki pages, you may want to enclose the {section} loop with an IF statement, to verify that the page is a wiki page.

If anyone can improve the code, please feel free!

HTH,

-RickQuestion