10 years ago
Topic
I would like to know how I can call individual fieldX items in a custom template. I am currently able to get the ID of each item using
<?php foreach($cck->getvalue( 'event_djs_playing_x' ) as $fx){ ?> <li>DJlink: <?php echo 'index.php?option=com_content&view=article&id='.$fx->value; ?></li> <?php } ?>
but I cant find how to get each articles title.
If i use renderfield ($cck->renderfield( 'event_djs_playing_x' );) I get the titles of all of the entries in the field but dont know how to get them individually so I can link the titles to the articles..
I have also tried using SD Databaser but that doesnt appear to work on fieldX fields.
Any help woud be greatly appreciated.
Get a VIP membership
10 years ago
0
Level 1
When I use SD databaser the typo results are stored separated by a comma so i can use
$vendetails = explode(',',$cck->renderField('event_venue')); and call each stored item using $vendetails[3]. Is there anything similar i can do with field x stored information?
10 years ago
0
Level 2
Hey Zwergo, thanks for replying. Yes i did, thats how i solved the problem in the end but i forgot to come back and mark this post as solved. oops. Actually it was a combination of that post and using $cck->getHtml ('myfield'); which i didnt know existed before.
Get a Book for SEBLOD