Comments (2)
This seems to be the case for me even when putting the entries field directly on the entry's field layout - could you please confirm whether that's what happens for you?
from craft-neo.
@ttempleton yes! I see the same behavior with the entries field on the entry itself.
Checking further, if I add a site('*')
parameter to the query, then the articles from the other site are retrieved.
{% for r in entry.relatedArticles.site('*').all() %}
{{ r.title }}
{% else %}
No related articles on the entry.
{% endfor %}
{% for block in entry.blocks.all() %}
{% if block['relatedArticles'] is defined %}
{% for article in block.relatedArticles.site('*').all() %}
{{ article.title }}
{% else %}
No related articles.
{% endfor %}
{% endif %}
{% endfor %}
So what must be happening is the that the current site is used by default when no site param is specified, and we need to expressly set it to get the entries from other sites.
Looks like this is the expected behavior.
from craft-neo.
Related Issues (20)
- Error trying to propagate Neo field after updating translation settings HOT 2
- Neo Not Saving Changes to Field Layout HOT 2
- Exponential increase of blocks when adding an existing entry to another site HOT 5
- [Craft 5] Allow Neo fields to be reusable in field layouts HOT 1
- How to approach eager-loading in Craft 5 HOT 4
- Neo block queries return duplicate child blocks HOT 8
- [Craft 5] Action Menu won't open after a new Block is added HOT 3
- Craft keeps showing "Unsaved Changes" upon saving of an entry with Neo fields HOT 1
- Getting Invalid Field Layout Error in CP HOT 1
- Change section and site in content migration: Neo blocks lost HOT 4
- Copy / Paste of Neo Blocks HOT 1
- Javascript Error When Trying to Add a Block in Neo HOT 2
- Settings menu for fields in the layout designer not opening in Craft 5 HOT 2
- benf\neo\elements\Block::useMemoized(): Argument #1 ($use) must be of type Illuminate\Support\Collection|array|bool, benf\neo\elements\db\BlockQuery HOT 1
- Conditional asset fields not saving values after switching condition HOT 1
- [5.x] Error after changing field handle: Field is not included in the available field layouts HOT 5
- Entry condition applied even for single pages HOT 3
- Duplicate entries appear in `orders` yaml files when deleting block types HOT 1
- Infinite loop in the cms. Auto saving the draft before the entry is manually saved causes the loop HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from craft-neo.