View.php uses Underscore.js

This addon uses Underscore.js, which is bundled in concrete5.

The html element with the class .searchresult will be a place for displaying search results.

This elements needs two data attributes.

  • data-template: the template used to display search results. 
  • data-minlength: the minimum length to execute search.


The template used for displaying search results will be like this;

<script type="text/html" id="searchresult<?php echo $bID;?>">
    <li class="searchresultitem">
        <p><a href="<%- url %>" target="_self"><%- title %></a>
        <%- description %></p>

The id for the script should match the value of the data-template.

For more info, please go to