New answers tagged

1

Just to add to the answer above, in plain text the answer would be: 'and, not 1, not 2' Or, in an entry query: {%- set entries = craft.entries({ section: 'blog', id: 'and, not 123, not 456, not 789', }).all() %}


2

Thanks for this @mmc501 I have adapted the code to work the wonderful sprig plugin. {% set time = time ?? "now" %} <div class="grid text-center"> <div class="col"> <button sprig s-vars="time: '{{time|date_modify('-1 month')|date()}}'">Prev</button> </div> <div class=...


2

Doing further research i noticed the performance impact is mainly due to sorting on the default publication date. When sorting on the title field all the performance issues are gone.


2

You need to use newParentId: $navigationItem = new Entry(); $navigationItem->typeId = 4; $navigationItem->sectionId = $navigationSection->id; $navigationItem->title = $entry->title; $navigationItem->newParentId = $herbsNavigationEntry->id; $navigationItem->setFieldValue('navLink', '/tags/' . $entry->slug); if (!Craft::$app->...


Top 50 recent answers are included