Replies: 1 comment
-
OK, that code is very hard to follow, but it's because you aren't using the data natively. First off, why don't you pass the full entry to the View? Second, is that an Antlers view or a blade one? Lastly, here's how you can get the entry: $entry = Entry::whereCollection('spaces')->where('slug', $request->space)->first(); Then add that the view and you're golden, if it's an antlers view, I believe. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a basic entries field called Combined Spaces on a collection that is being pushed through a controller.
The controller it is set up like (with unnecessary lines cut out for easier reading):
When I call the field like:
{{ combined_spaces }} {{ title }} {{ /combined_spaces }}
It just shows the actual page's title 3 times. There are 3 entries added to that field, so the number makes sense, but it is not pulling the actual entry title as it should.
When i use the
{{url}}
field inside the loop it doesn't show anything.When i dump the data with
{{combined_spaces | dump }}
i do see the set of three IDs as expected in the network inspector, so it is looping through the array but nothing is being outputted from it.Any ideas why the title and url won't show up when the IDs do?
Is there a way to test if the title/url data is there?
Sorry , I'm new to Statamic, so sorry if there is an obvious answer here.
My one thought is that the controller is sending the IDs in the wrong format, but I have no idea how to check for formatting.
Beta Was this translation helpful? Give feedback.
All reactions