Revision b008468d
Added by Niels Hoffmann over 15 years ago
themes/diptera/template.php | ||
---|---|---|
87 | 87 |
|
88 | 88 |
} |
89 | 89 |
|
90 |
function diptera_cdm_taxon_page_images($taxonTO){
|
|
90 |
function diptera_cdm_taxon_page_images($taxon){ |
|
91 | 91 |
|
92 |
$descriptions = $taxonTO->featureTree->descriptions; |
|
93 |
foreach($descriptions as $descriptionTo){ |
|
94 |
$features = $descriptionTo->features; |
|
95 |
foreach($features as $featureTo){ |
|
96 |
if($featureTo->feature->term == 'Image'){ |
|
97 |
if(count($featureTo->descriptionElements) > 0){ |
|
92 |
$descriptions = $taxon->featureTree->descriptions; |
|
93 |
foreach($descriptions as $description){ |
|
94 |
$features = $description->features; |
|
95 |
foreach($features as $feature){ |
|
96 |
if($feature->feature->term == 'Image'){ |
|
97 |
$descriptionElements = $feature->descriptionElements; |
|
98 |
if(count($descriptionElements) > 0){ |
|
98 | 99 |
$imagesExist = true; |
99 | 100 |
// display image |
100 |
$out .= ""; |
|
101 |
|
|
102 |
foreach($descriptionElements as $descriptionElement){ |
|
103 |
$medias = $descriptionElement->media; |
|
104 |
foreach($medias as $media){ |
|
105 |
$representations = $media->representations; |
|
106 |
foreach($representations as $representation){ |
|
107 |
$representationParts = $representation->respresentationParts; |
|
108 |
foreach($representationParts as $representationPart){ |
|
109 |
$out .= '<img src="' . $representationPart->uri . '" alt=""/>'; |
|
110 |
} |
|
111 |
} |
|
112 |
} |
|
113 |
} |
|
114 |
|
|
101 | 115 |
} |
102 | 116 |
} |
103 | 117 |
} |
Also available in: Unified diff
changing display of images for diptera