diff --git a/modules/cms/classes/CmsObjectQuery.php b/modules/cms/classes/CmsObjectQuery.php index 69f0df865..616b8d62b 100644 --- a/modules/cms/classes/CmsObjectQuery.php +++ b/modules/cms/classes/CmsObjectQuery.php @@ -62,6 +62,19 @@ class CmsObjectQuery return $this; } + /** + * Finds a single Cms Object by its file name + * @param string $fileName + * @return CmsObject + */ + public function find($fileName) + { + if ($this->useCache) + return forward_static_call($this->cmsObject, 'loadCached', $this->theme, $fileName); + else + return forward_static_call($this->cmsObject, 'load', $this->theme, $fileName); + } + /** * Returns all CMS objects for the set theme * @return CmsObjectCollection