We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [join]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
48 views

Entries from matrix should not appear in loop

I have a Matrix with an entry field. I have a Loop which is looping entries out of a section. Goal: The entries from the matrix should not appear in the loop of the section. So the Matrix defines ...
2
votes
2answers
187 views

Element Query matrixfields where

I'm trying to query entries in a section where the (activities) entry has an item in a matrix field timeSlots -> timeSlot -> startDate. The startDate must be >= NOW(). $query = Entry::find()->...
1
vote
1answer
365 views

Setting unknown property when trying to join table

I've successfully joined a table to the elements table, however I can't can't seem to add a property so I can use it? Getting the error Setting unknown property when trying to join table Entry::find(...
1
vote
1answer
553 views

Joining two plugin tables by reference Id causes duplicates

I'm running a query in which I need to join two tables table_views and table_clicks. Both tables share several column names (mainly refId, month, year and total). However when I try and join these ...
2
votes
1answer
311 views

Sort by MatrixBlock Field / Eager load Matrix Field

Is there currently a way to eager load the matrix values of an element and thus be able to sort by one of its fields? Imagine you have something like the following: $criteria = craft()->elements-&...
2
votes
1answer
264 views

How can I join plugin data with entry data based on uri?

I have a plugin with a record (and model). The record have attributes uri and hits. The uri attribute in my record corresponds to an entry's uri, as stored in the craft_elements_i18n table. What is ...
15
votes
1answer
1k views

How do you sort elements queried from multiple channels?

This is how I query elements from multiple channels: {% set allEntries = craft.entries.section(['publication','text', 'exhibition']).limit(null) %} I now want to sort all these entries by a custom ...