Hello,
Not sure it's the best way, but here is what I done. For feedback and sharing.
- duplicate the template 'default'
- edit the Item layout
- select the item_html5.php
- "load/customize the system's default"
- I didn't find where to put the div you talk, so I add
style="background: url(<?php echo $item->fields["MYFIELDNAME"]->{"display_medium_src"} ?>) no-repeat center 0 / 100%;"
at the line 66 of item_html5.php, so now it's like that :
<?php echo '<'.$mainAreaTag; ?> id="flexicontent" class="<?php echo $page_classes; ?> group" style="background: url(<?php echo $item->fields["MYFIELDNAME"]->{"display_medium_src"} ?>) no-repeat center 0 / 100%;" <?php echo $microdata_itemtype_code; ?>>
Not sure if it's the best way... but it works
You can note:
- I add the "
url()" parameter in the background property
- with "
no-repeat center 0 / 100%" it works fine with my responsive template