Default Values in concrete 5.7?

Permalink
Hi Guys I was just wondering if you still create default values for custom blocks the same way in 5.7 as in the older versions?

I noticed this works now:
<div class="form-group">
                <?php echo $form->label('maxWidth', t('Max Width'))?>
                <?php if(is_null($maxWidth) || $maxWidth === 0) { $maxWidth = '600';} ;?>
                <?php echo $form->text('maxWidth', $maxWidth, array('style' => 'width: 60px')); ?>
        </div>



But I can not get that to work when the variable is in an array, like with the image slider you have the same variable multiple times like so:

<div class="form-group">
            <label><?php echo t('Duration') ?></label>
            <input type="text" name="<?php echo $view->field('duration')?>[]" value="<%=duration%>" />
        </div>


So how do I make the default values work in that case??

 
MichaelG replied on at Permalink Reply
MichaelG
<% %> represents underscore javascript variables. So if you're modifying something like the image slider block, you need to define the underscore template variable.