FLEXIcontent Field Group Accordion

More
8 years 8 months ago - 8 years 8 months ago #56843 by ggppdk
Hello

are you asking or are you giving the answer ?

you probably do not want to use phpThumb but some of the thumbnails
s_
m_
l_
Code:
$imgField = $item->fields[IMAGE_FIELD_NAME]; echo $field->thumbs_src['medium'][0];


-- 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 8 months ago by ggppdk.

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

More
8 years 8 months ago #56847 by iamrobert
Thanks.

I'm asking - as I'm trying to work my way through it and will write a little tutorial/snippets file when done.

I needed to edit the code:
Code:
$imgField = $item->fields['inno_image']; for($i=0; $i<$count; $i++){ // echo '<h3>'.$title_value[$i].'</h3>'.'<p>'.$brief_value[$i].'</p>'; echo '<img src="'.$imgField->thumbs_src['large'][$i].'" alt="'.$image_value[$i]['alt'].'" />';

This seems to work.

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

More
8 years 8 months ago #56883 by iamrobert
Here's my final code - if anyone is interested:
Code:
<?php //title $title_id = 59; // brief $brief_id = 60; // image $image_id = 61; // Main Text/Complete $maintext_id = 62; // Use in ITEM view / Category (multi-items) view $titlevals = $item->fieldvalues[$title_id]; $briefvals = $item->fieldvalues[$brief_id]; $imagevals = $item->fieldvalues[$image_id]; $maintextvals = $item->fieldvalues[$maintext_id]; // Title if (!empty($titlevals)) foreach ($titlevals as $t) { if ( @unserialize($t)!== false || $t=== 'b:0;' ) $t = unserialize($t); // var_dump($v); } // Brief Text/Intro text if (!empty($briefvals)) foreach ($briefvals as $brief) { if ( @unserialize($brief)!== false || $brief=== 'b:0;' ) $brief = unserialize($brief); } // Image if (!empty($imagevals)) foreach ($imagevals as $imagev) { if ( @unserialize($imagev)!== false || $imagev=== 'b:0;' ) $imagev = unserialize($imagev); } // Main Text/Complete if (!empty($maintextvals)) foreach ($maintextvals as $maintext) { if ( @unserialize($maintext)!== false || $maintext=== 'b:0;' ) $maintext = unserialize($maintext); // var_dump($maintext); } $count =0; if (!empty($titlevals) or !empty($briefvals) or !empty($imagev) or !empty($maintextvals)) foreach ($titlevals as $t) { $title_value[$count] = $t; $count++; } $count2 =0; if (!empty($briefvals)) foreach ($briefvals as $brief) { $brief_value[$count2] = $brief; $count2++; } $count4 =0; if (!empty($maintextvals)) foreach ($maintextvals as $maintext) { $maintext_value[$count4] = $maintext; $count4++; } $count3 =0; if (!empty($imagevals)) foreach ($imagevals as $imagev) { $image_value[$count3]= unserialize($imagev); $count3++; } $imgField = $item->fields['inno_image']; echo '<ul class="small-block-grid-1 medium-block-grid-3">'; for($i=0; $i<$count; $i++){ echo '<li><ul class="accordion" data-accordion="myAccordionGroup"><li class="accordion-navigation">'; echo '<a href="#panel'.$i.'"><img src="'.$imgField->thumbs_src['large'][$i].'" alt="'.$title_value[$i].'" /></a>'; echo '<div id="panel'.$i.'" class="content">'; echo '<h3 class="red">'.$title_value[$i].'</h3>'.'<h4 class="grey">'.$brief_value[$i].'</h4>'; echo $maintext_value[$i].'<hr></div>'; //echo '<img src="'.$imgField->thumbs_src['large'][$i].'" alt="'.$image_value[$i]['alt'].'" />'; echo '</li></ul></li>'; } echo '</ul>'; ?>

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

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