I am trying to customize the display of the iFrame for the Embed Codes. In particular, I want to add more metadata elements.
I was able to add the Dublin Core description and date with this code in the embed.php file.
<?php if ($description = metadata('item', array('Dublin Core', 'Description'), array('snippet'=>350))): ?>
<div class="item-description">
<?php echo $description; ?>
</div>
<?php endif; ?>
<?php if ($date = metadata('item', array('Dublin Core', 'Date'), array('snippet'=>250))): ?>
<div style ="margin-top: 10px" >
<?php echo "<font color='#D89966'>Date: </font>";?>
<?php echo $date; ?>
</div>
This works fine. However, when I add the same language for an Item Type Metadata element, the iframe ceases to show up or else the Item Type Metadata is ignored. For example, I have an Item type called "Articles" with an element called "Prepared By". I tried the following code, but it doesn't work:
<?php if ($preparedby = metadata('item', array('Item Type Metadata', 'Prepared By'), array('snippet'=>250))): ?>
<div style ="margin-top: 10px" >
<?php echo "<font color='#D89966'>Prepared By: </font>";?>
<?php echo $preparedby; ?>
</div>
I also tried this code by itself without the variables:
<?php echo item('Item Type Metadata', 'Prepared By'); ?>
Is my syntax wrong? Maybe I need to call the item type as well? I tried it with other item type elements that don't have a space, but it still didn't work.
Thanks,
Karen