Hello
-- you need to pass to the function the already retrieved item data
--
in your case i think you passed an non-existent variable, probably because you are outside the loop that display the items
there are 2 loops inside the templates
tmpl/news.php
tmpl/carousel.php
since you duplicated carousel.php
make sure that you are either inside loop outputing "standard" items or "featured" items:
Code:
<?php
foreach ($ordering as $ord) :
...
<?php if (isset($list[$ord]['featured'])) : ?>
...
<?php foreach ($list[$ord]['featured'] as $item) : ?>
...
// *************** HERE
...
<?php endforeach; ?>
...
<?php endif; ?>
...
<?php if (isset($list[$ord]['standard'])) : ?>
...
<?php foreach ($list[$ord]['standard'] as $item) : ?>
...
// *************** HERE
...
<?php endforeach; ?>
...
<?php endif; ?>
...
<?php endforeach; ?>
Also you can do it -just- outside the loop for all the items at once:
Code:
<?php FlexicontentFields::getFieldDisplay($list[$ord]['featured'], 'fieldname'); ?>
<?php foreach ($list[$ord]['featured'] as $item) : ?>
...
<?php FlexicontentFields::getFieldDisplay($list[$ord]['standard'], 'fieldname'); ?>
<?php foreach ($list[$ord]['standard'] as $item) : ?>
...
-- after doing the above you can do:
Code:
print_r( $item->fields['slides']->thumb_src['small'] );
print_r( $item->fields['slides']->thumb_src['medium'] );
print_r( $item->fields['slides']->thumb_src['large'] );
But if you field was configured in module parameters to be used as image for the carousel, then it is probably already rendered and you do not need to call getFieldDisplay()
And to get the field values of different field for linking, you do not need to call getFieldDisplay:
instead use:
$item->fieldvalues
(i think that is your original question)
[url=http://www.flexicontent.org/documentation/faq/70-developer-api-field-plugins/312-using-the-raw-value-of-a-field-inside-a-template-file-or-inside-a-new-custom-field-type.html
]Using the raw value of a field inside a template file or inside a new custom field type[/url]