Getting content from a smart folder into a portlet

I haven’t seen a tutorial on how to get content from a smart folder into a portlet but as far as I can see the trick is just to use queryCatalog(full_objects=’true’) on the smart folder where you would have used getFolderContents().

<html xmlns:tal=";


<!– The smart folder portlet  –>

<div metal:define-macro="portlet" tal:omit-tag=""
     tal:define="results python:here.mysmartfolder.queryCatalog(full_objects=’true’);"

         <div class="portlet" id="portlet-smartfolder">
        <h5>Smart folder</h5>
           <tal:block repeat="obj results">
                <br />
                <p><strong tal:content="python:test(obj.Title, obj.Title(), obj.getId())"> Title </strong><br />
                <span tal:replace="structure obj/Description">Description</span>
                <br />
                <a xhref="" i18n:translate="read_more" tal:attributes="href obj/absolute_url">Read More</a>
                <br /></p>






technorati tags: , ,


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s