Skip to content

Commit

Permalink
Merge pull request #2 from Flowdeeps/patch-1
Browse files Browse the repository at this point in the history
Update sub-content.php
  • Loading branch information
MiczFlor authored Mar 7, 2017
2 parents e376726 + 9baafb8 commit 9fdf09c
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions php-snippets/sub-content.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,24 +57,26 @@
print "
".$story['intro'];
}
// go through the snippets in the array and print text or image
foreach($story['snippets'] as $snippetid => $snippetvalues) {
if(isset($snippetvalues['src'])) {
print "
<figure class=\"cms-image ".$snippetvalues['align']."\" style=\"max-width: 360px;\">
<img src=\"".$snippetvalues['src']."\" style=\"max-width: 100%\" rel=\"resizable\" alt=\"\" />
<figcaption>".$snippetvalues['title']."
<span class=\"photographer\">
".$snippetvalues['credits']."
</span>
</figcaption>
</figure>";
}
if(isset($snippetvalues['text'])) {
print "
".$snippetvalues['text'];
}
} // foreach($story['snippets']
// go through the snippets in the array and print text or image
if(isset($story['snippets']) && count($story['snippets']) > 0) {
foreach($story['snippets'] as $snippetid => $snippetvalues) {
if(isset($snippetvalues['src'])) {
print "
<figure class=\"cms-image ".$snippetvalues['align']."\" style=\"max-width: 360px;\">
<img src=\"".$snippetvalues['src']."\" style=\"max-width: 100%\" rel=\"resizable\" alt=\"\" />
<figcaption>".$snippetvalues['title']."
<span class=\"photographer\">
".$snippetvalues['credits']."
</span>
</figcaption>
</figure>";
}
if(isset($snippetvalues['text'])) {
print "
".$snippetvalues['text'];
}
} // foreach($story['snippets']
}
print "
</div><!-- / .text -->
</div><!-- / .row -->";
Expand Down

0 comments on commit 9fdf09c

Please sign in to comment.