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

Code example for submission model #11

Closed
outline4 opened this issue Sep 27, 2016 · 3 comments
Closed

Code example for submission model #11

outline4 opened this issue Sep 27, 2016 · 3 comments
Labels

Comments

@outline4
Copy link

Hi, I am not sure if I understand what the submission model does?

Would this be something like: craft.workflow.section('xx').id?

A code example would be very welcome...

@outline4 outline4 changed the title Code example for submission Model Code example for submission model Sep 27, 2016
@outline4
Copy link
Author

Or, in other words, how can I only display entries that are approved?

@engram-design
Copy link
Member

An entry is not public by default (when using this plugin in an editor workflow, with permissions setup correctly), which is why an editor needs to submit an entry for approval.

Say, and editor creates a new entry. This cannot be published (live), and instead needs to be submitted for review. This is setup through Craft's permissions. As such, when you use craft.entries.section('blog') or similar, this entry won't be shown in this query because its not live. Only after a publisher has approved an entry is it visible to these queries, and will be shown publicly on your website.

This is all native Craft publishing and permissions behaviour by the way. As such, its essentially 'done for you', and there's no need to specifically query which entries are approved or not.

The Submission Model is something internal to the Workflow plugin, and used to track the status of a permission, among other things.

Hope that makes sense?

@engram-design
Copy link
Member

Closing due to inactivity.

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

No branches or pull requests

2 participants