Created
October 24, 2013 09:10
-
-
Save cedricdekimpe/7133808 to your computer and use it in GitHub Desktop.
LocomotiveCMS search : liquid template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends 'parent' %} | |
<h1>{{ page.title }}</h1> | |
{% if search_results.size == 0 %} | |
<p><strong>There is no result</strong></p> | |
{% endif %} | |
{% for result in search_results %} | |
{% case locale %} | |
{% when "fr" %} | |
{% capture url %}/index/{{result._permalink}}{% endcapture %} | |
{% else %} | |
{% capture url %}/index/{{locale}}/{{result._permalink}}{% endcapture %} | |
{% endcase %} | |
<h2><a href={{url}}>{{ result.title }}</a></h2> | |
<p>{{ result.summary }}</p> | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment