[Plone-UI] Easy Template

difi80211g difioreg at casd.k12.pa.us
Wed Oct 14 14:47:08 UTC 2009


I have everything working exactly the way I want now except for one thing. 
Can anyone help with the property that will allow me to limit the query to a
specific folder.  On the following statement i tried to add "path" :
"/folder" among others but can not find the property to get it to search
only a particular folder for News Items.  

{{ query({"portal_type":"News
Item","sort_on":"Date","sort_order":"reverse","sort_limit":3,"review_state":"published"}) 
}} 

Thanks again for the help.


difi80211g wrote:
> 
> OK, thank you for that piece.  Now i just need to find someone else that
> can help with the other part.  I can't seem to find the information online
> to make it work.
> 
> 
> 
> Nathan Van Gheem wrote:
>> 
>>>
>>> [<Products.ZCatalog.Catalog.
>>>>
>>>> mybrains object at 0x8329330>,
>>>> <Products.ZCatalog.Catalog.mybrains object at 0x865d4e0>,
>>>> <Products.ZCatalog.Catalog.mybrains object at 0x865dba0>]
>>>
>>> Is just a list of brains.
>> 
>> So you'll have to figure out what the jinja way of doing a for loop in a
>> template is and mix markup with it.  Then you access object information
>> from
>> it's brain.  For instance, these are some common things you might want,
>> 
>>>
>>> brain.getURL
>>> brain.Title
>>> brain.Description
>>>
>> 
>> Good luck,
>> Nathan
>> 
>> 2009/10/9 difi80211g <difioreg at casd.k12.pa.us>
>> 
>>>
>>> I installed easy template on my Plone site, however I am unable to
>>> display
>>> the results I want.  I tried using the query that is listed on the
>>> product
>>> page:
>>>
>>> {{ query({"portal_type":"News
>>>
>>> Item","sort_on":"Date","sort_order":"reverse","sort_limit":3,"review_state":"published"})
>>> }}
>>>
>>> but the only results I get are:
>>>
>>> [<Products.ZCatalog.Catalog.mybrains object at 0x8329330>,
>>> <Products.ZCatalog.Catalog.mybrains object at 0x865d4e0>,
>>> <Products.ZCatalog.Catalog.mybrains object at 0x865dba0>]
>>>
>>> I was told that I have to use a Jinja template to convert the catalog
>>> brains
>>> to HTML objects, however I can not find the documentation to do so.  I
>>> am
>>> trying to use the query above to list the 3 most recent news stories on
>>> my
>>> page.
>>>
>>> Can anyone shed some light on this situation for me?  Thank you.
>>> --
>>> View this message in context:
>>> http://n2.nabble.com/Easy-Template-tp3794092p3794092.html
>>> Sent from the User Interface & Design mailing list archive at
>>> Nabble.com.
>>>
>>> _______________________________________________
>>> UI mailing list
>>> UI at lists.plone.org
>>> http://lists.plone.org/mailman/listinfo/ui
>>>
>> 
>> _______________________________________________
>> UI mailing list
>> UI at lists.plone.org
>> http://lists.plone.org/mailman/listinfo/ui
>> 
>> 
> 
> 

-- 
View this message in context: http://n2.nabble.com/Easy-Template-tp3794092p3823223.html
Sent from the User Interface & Design mailing list archive at Nabble.com.




More information about the UI mailing list