I'm displaying data onscreen from the database with the following code
I would like to pull data from the images field, specifically the subfield "image_fulltext_caption" as shown here in the database -

I just cannot figure out the proper syntax for it to work, I was thinking something like the following -
{var:read_data17.load_fields.title}This is working correctly and displaying from the proper field.
I would like to pull data from the images field, specifically the subfield "image_fulltext_caption" as shown here in the database -

I just cannot figure out the proper syntax for it to work, I was thinking something like the following -
{var:read_data26.load_fields2.images."image_fulltext_caption"}I've tried a couple different things but can't get anything to work
It's JSON encoded so you have to json decode it first.
I am able to display the entire field on screen, just trying to dig a little deeper.
This is what I have in the custom code
This is is what it looks like on the front end, I would like to just display the "image_fulltext_caption" field

Frontend Link
This is what I have in the custom code
ID: {var:read_data17.load_fields.id}<br>
Introtext: {var:read_data17.load_fields.introtext}<br>
Created By Alias: {var:read_data17.load_fields.created_by_alias}<br>
Title: {var:read_data17.load_fields.title}<br>
Alias: {var:read_data17.load_fields.alias}<br>
CatID: {var:read_data17.load_fields.catid}<br>
Images: {var.jasonde:read_data17.load_fields.images}
This is is what it looks like on the front end, I would like to just display the "image_fulltext_caption" field

Frontend Link
Have you tried adding .image_fulltext_caption to that var call?
Yes, I've tried
{var.jasonde:read_data17.load_fields.image_fulltext_caption}and
{var.jasonde:read_data17.load_fields.images.image_fulltext_caption}Just shows up blank
Do it in PHP then.
Then use {var:php_name}
Dont copy paste from forums though type manually
$images = json_decode($this-get("read_data17.load_fields.images"), true);
return $images["field_you_want"];
Then use {var:php_name}
Dont copy paste from forums though type manually
Think I typed it in correctly but I'm just getting a spinning wheel when I execute...

Sorry $this->get
That did it, thanks!
This topic is locked and no more replies can be posted.