Can you set up a default widget to ipBlock(), same as you can create a slot and set defaults in
ipSlot('name',array('id'='id','tag'=>'tag','default'=>'default whatever));
?
Can you set up a default widget to ipBlock(), same as you can create a slot and set defaults in
ipSlot('name',array('id'='id','tag'=>'tag','default'=>'default whatever));
?
No, you cannot set up default widget to blocks. However, you can show your example content.
ipBlock('block-name')->exampleContent('<p>Any HTML you want.</p>');
Most common usage is to create a real widget, copy the source code that is rendered (HTML) and paste as example.
I hope this will help.
I tried this with the following code. It works fine with IP 4.5.2 and 4.6.0
<?php echo ipSlot('text', array(
'id' => 'my_text_slot_1' . ipContent()->getCurrentPage()->getId(),
'default' => '<img src="http://localhost/ImpressPages/Theme/MyTheme/images/my-image.png" alt="">')); ?>
okay, wrong answer but very nice to set non-static dummy-content into IP ;)