How do I get fields to display in an article via php?

More
10 years 4 months ago #49057 by garfry
So I am creating a new fields for an article. I want those new fields to display in that article via php (I am using the NoNumbers Sourcer for that).
So if I had a "All about BLUE Widgets" article with fields called "size" and "weight".
I want "size" and "weight" to be displayed in the body of the "All about BLUE Widgets" article.
And I would want the "size" and "weight" of the RED Widget to display in the article on "All about RED Widgets"

Does that make sense? Is there a Flexi Content plugin that will do this without php?
Is the php something like this???:
<?php
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query
->select('size')
->from('#__cck_store_widgets_specs')
$db->setQuery($query);
$widgetSize = $db->loadObjectList();
echo $widgetSize->get("size");
?>
Any help would be great.
Thanks

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

More
10 years 4 months ago #49058 by micker
you can use sql query in select field, not good for you ?

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
10 years 4 months ago #49059 by garfry
Not sure what you mean. How would you write the php differently?

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

More
10 years 4 months ago #49060 by micker
not but you can use many field with sql query and put result in value

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.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.362 seconds
Save
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