How to insert into the field description ( maintext )

More
8 years 6 months ago - 8 years 6 months ago #61809 by ggppdk
Hello

it is almost no cost to execute such a query for item view e.g. <1 ms because you are query by ID

but you can also try this:
Code:
<?php print_r($item->fieldvalues); ?>

does it work ?
(it may work if $item is in scope ...)

if it works then you can use:
Code:
<?php print_r($item->fieldvalues[455]); ?>

where 455 is the FIELD ID of the image field


-- 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...
Last edit: 8 years 6 months ago by ggppdk.

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

More
8 years 6 months ago #61822 by tadzio

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

More
8 years 6 months ago #61835 by ggppdk
Hello

ok, so these will work only inside the template code


-- 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
8 years 6 months ago - 8 years 6 months ago #61841 by tadzio
Done.
First must be image field
php code and jumi plugin
Code:
<?php $img = $jumi[0]; //echo $img; $itemid = JRequest::getVar('id'); //echo JRequest::getVar('id'); // Connect to database $db = JFactory::getDbo(); $query = $db->getQuery(true); // Build the query $query->select($db->quoteName(array('field_id', 'value'))); $query->from($db->quoteName('#__flexicontent_fields_item_relations')); $query->where($db->quoteName('item_id') . ' LIKE '. $db->quote($itemid). ' AND '.$db->quoteName('field_id') . ' LIKE '. $db->quote('%36%')); $query->order($db->quoteName('valueorder')); $query->setLimit('10'); $db->setQuery($query); $results = $db->loadObjectList(); // Print the result $result = $results[$img]; $result = explode('"', $result->value); echo '<div style="text-align: center;">'; echo '<img src="images/stories/flexicontent/m_fld36_'.$result[3].'" alt="" />'; echo '<div style="text-align: center;">'.$result[15].' '.$result[11].'</div>'; echo '</div>'; ?>

In article text {jumi [*ID][img_nr]}
example:
blabla1
{jumi[*11][0]}
BLABLALALLLLA
NNMKSKASASA
{jumi[*11][1]}
example
Last edit: 8 years 6 months ago by tadzio.

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.426 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