Compilations plugin

The Compilations plugin allows you to create groups of products. You select products by navigating to them in the administrator pages and checking one or more Compilations. Compilations are displayed using the Compilations element.

Tip: A Compilation's before and after text is excellent for creating unique content around selected products. Combine this with a Landing page and you can build highly optimized pages for search engine ranking. 

Adding products

Add products to a compilation by navigating to the desired product in your administrator pages and checking the relevant Compilations checkbox.

Removing products

Removing products from a Compilation can be done in 2 ways:

  1. Navigate to the product you want to remove from the compilation and uncheck the relevant checkbox.
  2. Open the Products tab of your Compilation and click the dustbin icon of the relevant product.

Showing Compilations

Compilations are displayed with the Compilations element. You need to edit your template files for this. Before editing template files, make sure you read the getting-started section.

The simplest way to add a Compilation to your page is with this code:

<?php echo $this->element('compilation', array('name' => 'featured-products', 'template' => 'list')));?>

Lets see what this code does. The entire code is enclosed in <?php and ?> tags. This tells the server we're dealing with PHP code that needs to be executed. The echo command tells PHP to write stuff to the page and the $this->element determines what is written. In this case the compilation element is invoked. And finally the array( ... ) gives some parameters to the compilation element. Most important is the name parameter. This must match the name of the Compilation as you named it in the administrator pages. The template parameter may be either list, grid or tiny-list, depending on how you want to show your products.

Save your template (view) file and upload it to the appropriate folder on your web server. Reload the page to view the results. If nothing shows, you may need to clear the DF/Manager cache; use this link from the Dashboard page.