Is there a hook in Craft to intercept an Entry before being returned to a (front-end) template? Thinking here of ways we can manipulate what is being returned in the Element Criteria Model without affecting the underlying content.

Thoughts appreciated

1 Answer 1


Probably depends on the specifics of what you're trying to accomplish, but your best bets I'm guessing would be to listen to some of the element level events, make sure it's an entry and a site request, then do your logic.

onBeforeBuildElementsQuery, onBuildElementsQuery, and onPopulateElements are potential candidates.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.