Skip to content

Commit adc756f

Browse files
committed
Updated example code.
1 parent aaa8b87 commit adc756f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,12 @@ $clothing = $collection->categoryClothing()->getAll();
5656
$catsuit = $collection->getByID('clothing.catsuit');
5757

5858
// Get the screenshot URL for a mod
59-
if($catsuit->hasImage()) {
60-
echo '<img src"'.$catsuit->getImageURL().'">';
59+
$images = $catsuit->getScreenshotCollection();
60+
if($images->hasScreenshots()) {
61+
$default = $images->getDefault();
62+
?>
63+
<img src"<?php php echo $default->getURL() ?>" alt="<?php echo $default->getTitle() ?>">
64+
<?php
6165
}
6266
```
6367

0 commit comments

Comments
 (0)