Questions tagged [contentmodel]
The contentmodel tag has no summary.
10 questions
0 votes
1 answer
65 views
What would be the best approach to a 'live updating' news post in the CMS?
For example, Transfer Deadline Day, where the author will add new minor updates to a live post: https://www.bbc.co.uk/sport/football/live/cy0p77j5xwrt I have got it setup with a Matrix at the moment, ...
0 votes
1 answer
104 views
Best way to structure Craft 5 for shared content?
I am looking for some help, ideas and guidance on how you would structure/architect Craft for the following product pages? Each Product has some Unique Content (Highlighted in Green) and Shared ...
2 votes
1 answer
137 views
Redesign of existing commerce site with content/structure changes - whats the best way to manage this?
So I am currently working on an existing clients craft and craft commerce website and looking to completely redesign and revamp this. Earlier in the yer, this underwent a major upgrade in terms of the ...
3 votes
1 answer
994 views
Are categories the best way to organize Commerce product filters?
The Commerce site I'm working on (my first Craft project) will have a product listing page with filters. These will function as you would expect, but clicking a filter name will link to another ...
7 votes
1 answer
1k views
One structure vs a structure per section?
I'm new to Craft CMS and I would appreciate some advice re the best approach to take for modelling content. I'm coming from an ExpressionEngine background, where I would typically use one pages ...
3 votes
1 answer
211 views
Why does field value get updated on $element->getContent()->fieldHandle but not when accessed directly $element->fieldHandle?
I am trying to update a custom field on an EntryModel. I'm having half success, and I don't understand why. I've looked at other posts such as this one by Brandon which discuss how to assign these ...
1 vote
1 answer
3k views
Modelling flexible content sections and recommendations
A little background first; I'm coming from WordPress, along with the Advanced custom fields (ACF) plugin, so my thinking behind this may not be the best way in Craft. In ACF I usually set up a field ...
1 vote
1 answer
97 views
Architecting a Solution with many Sites within a Site (Chapters) - How many sections can Craft Handle?
I am working on a plan for a site build that includes national content as well as many chapters' content. The latter has a number of requirements that are leading me to using separate sections ...
15 votes
1 answer
3k views
What is getContent() / the ContentModel, and how do I use it to get and set custom field values?
If I want to retrieve content on an element, should I be calling $entry->$fieldHandle or $entry->getContent()->$fieldHandle? What’s the difference? Likewise, if I’m setting new content on an ...
2 votes
1 answer
564 views
Can someone help me identify why my entry is invalidating?
I have a custom plugin that's saving an entry successfully. While saving the entry I'm setting our "merchant" field (an entries field, limit=1) like so: <?php # ... $entry = newEntryModel(); # set ...