Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iterating over Events content type #813

Open
AshRaghav opened this issue Mar 31, 2017 · 4 comments
Open

Iterating over Events content type #813

AshRaghav opened this issue Mar 31, 2017 · 4 comments

Comments

@AshRaghav
Copy link

Hi,

Is it possible to obtain all contents of type "Events" and iterate them inside a plomino view or form?

If yes, can someone help me with the snippet to obtain the Events object?

Thanks

@AshRaghav
Copy link
Author

@ebrehault - any thoughts on this? Thanks

@ebrehault
Copy link
Member

Inside a view it is not possible, but inside a form, yes.
You can search the event contents using the portal_catalog:
context.getParentDatabase().portal_catalog.searchResults({'portal_type': 'Event'})

and you can iterate over the reuslts to fill in a Datagrid field for instance.

@allnode
Copy link

allnode commented Sep 22, 2017

Can you also show a snippet to get to the folder that contains the plomino database to do the search for Event? My Events are contained at the parent folder.

Also, please show how I can search on a specific Event tag.

@AshRaghav
Copy link
Author

Thanks Eric. Think that'll not work for my use case. Mainly because, I need the title to link to the individual event but Datagrids will not allow me to have any links like views?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants