craftcms / docs

Documentation for Craft CMS, Craft Commerce, and other official products.
https://craftcms.com/docs
38 stars 144 forks source link

Add documentation of owner and field properties available to partials #594

Closed jasonlav closed 2 months ago

jasonlav commented 2 months ago

Description

Add documentation of owner and field properties available to template partials, most commonly implemented when using embedded nested entries in CKEditor.

Source: https://craftcms.stackexchange.com/questions/41630/craft-5-ckeditor-accessing-parent-entry-from-partial/41631#41631

netlify[bot] commented 2 months ago

Deploy request for craft-docs pending review.

Visit the deploys page to approve it

Name Link
Latest commit 8ec9d63a5d530807c428cecb5e7e94b269f50ea8
AugustMiller commented 2 months ago

Thanks for submitting! I went ahead and combined this with another couple of requests for information on passing parameters to .render(), in 6fd194bcdfb70035e2a610e10194f02c98a834e4.

There are some edge cases that I thought were worth including—specifically, that owner and field aren't guaranteed to be available (or in the case of an owner, that it represents a single type of element) as .render() can be used on any element, not just nested ones!