fix 'buttons' check to prevent errors
it could cause problems while generating, when 'buttons' is not present or in wrong format
This commit is contained in:
parent
a7185c41bb
commit
afe97dc662
@ -27,9 +27,11 @@
|
|||||||
foreach ($page['entry_page'] as $key => $node) {
|
foreach ($page['entry_page'] as $key => $node) {
|
||||||
echo '<a href="' . $node . '" class="Button Button--primary Button--hero">' . $key . '</a>';
|
echo '<a href="' . $node . '" class="Button Button--primary Button--hero">' . $key . '</a>';
|
||||||
}
|
}
|
||||||
|
if(isset($params['html']['buttons']) && is_array($params['html']['buttons'])) {
|
||||||
foreach ($params['html']['buttons'] as $name => $link ) {
|
foreach ($params['html']['buttons'] as $name => $link ) {
|
||||||
echo '<a href="' . $link . '" class="Button Button--secondary Button--hero">' . $name . '</a>';
|
echo '<a href="' . $link . '" class="Button Button--secondary Button--hero">' . $name . '</a>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user