geting fields values of a related item

More
9 years 2 months ago #61248 by ydl
Hi,

I have two item typs: course and course_type
I create a related item in course which is poining to an item of a course_type type.
I am trying to get the value of fields stored in a (specific) item of the course_type in my custom code.
How I am doing it?
Thanks, Yair

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #61256 by micker
juste use {{fieldname}}

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #61257 by ydl
Thanks...
I am sorry but I don't understand.
I have in my code the following:
$courseType = $item->_row->fields;

now I want to get the '$courseTypeItem' from the related (reference) field and I don't understand how I am doing it....
Unless... I have to define the relation field for each field I want to get?

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #61311 by ydl
OK - I understand how to construct the "display" of a related field.
My issue is that with this solution I cannot sperate the diffrent fields of the related items...
I can think on a solution that the display will be stored in a JSON structure and will be convert to PHP variables in the template code.
Any other idea?

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #61391 by ggppdk
Hello

JSON output exists for category view only,
it allows retrieving all the allowed (by ACCESS Level) fields for current user

&format=json


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #61392 by ggppdk
Hello

also see out FAQ for loading an item in custom code

www.flexicontent.org/documentation/faq/7...-in-custom-code.html

So
1. you can load an item in custom code
2. examine the value of the item for the relation field and find the IDs
3. then get all related items


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.302 seconds
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save