Module to quickly render portlets of data from a simple template call
composer require "weboftalent/portlets:^4"
For a model to be rendered as a portlet, it must provide the 3 following methods and implement the RenderableAsPortlet interface
public function getPortletTitle();
public function getPortletImage();
public function getPortletCaption();
The model being rendered must implement the RenderableAsPortlet interface mentioned previously. An example call to render portlets is as follows:
$RenderPortlet('Activity','','Title',2,'SmallTitleAndImage')
The parameters are as follows:
In the template used to render the portlet, the records can be accessed using <control Records> - an example is below.
<ul class="slides">
<% control Records %>
<li>
<a href="$Link"><h5>$PortletTitle</h5>
<% control PortletImage %><% control SetWidth(170) %><img src="$URL"/><% end_control %><% end_control %>
</a>
<% end_control %>
</li>
</ul>
2.4 (tested with 2.4.5+) - stable24 branch
3.0 - stable30 branch
Module rating system helping users find modules that are well supported. For more on how the rating system works visit Module standards
Score not correct? Let us know there is a problem