|
|
|
|
difi80211g
()
|
|
||||||||||||
|
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. |
||||||||||||||
|
|
Nathan Van Gheem
()
|
|
||||||||||||
[<Products.ZCatalog.Catalog.Is just a list of brains.mybrains object at 0x8329330>, 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,
Good luck, Nathan 2009/10/9 difi80211g <[hidden email]>
_______________________________________________ UI mailing list [hidden email] http://lists.plone.org/mailman/listinfo/ui |
||||||||||||||
|
|
difi80211g
()
|
|
|
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
()
|
|
||||||||||||
|
Just look at the documentation for the templating engine.
google is your friend http://jinja.pocoo.org/2/documentation/ On Fri, Oct 9, 2009 at 11:47 PM, difi80211g <[hidden email]> wrote:
_______________________________________________ UI mailing list [hidden email] http://lists.plone.org/mailman/listinfo/ui |
||||||||||||||
|
|
difi80211g
()
|
|
||||||||||||
|
In reply to this post
by difi80211g
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.
|
||||||||||||||
|
|
Daner
()
|
|
||||||||||||
|
In reply to this post
by Nathan Van Gheem
Thanks for that Google link!
|
||||||||||||||
| Free Embeddable Forum Powered by Nabble | Help |