I'm new to Craft CMS dev and I'm trying to create a template using Twig and I'm getting this error: Craft\EntryModel and its behaviors do not have a method or closure named "Case Studies"
I have a reference in the view file:
{% for entry in entry.caseStudies %}
I'm assuming there's a config file or somewhere I can add this to the EntryModel but I'm not sure where this is in the default Craft installation. Any suggestions are welcome.
Thanks
caseStudies
is defined (and spelled correctly), and that it has been added to the field layout of the entry in question.caseStudies
and how are you defining the initialentry
? You'll probably want to rename it to{% for anythingBesidesEntry in entry.caseStudies %}
so as not to clobber the originalentry
variable name.