cmsplugin-googlesearch / cmsplugin_googlesearch / templates / plugins / cmsplugin_googlesearch / googlesearch.html

{% extends "index.html" %}
{% load cache cms_tags i18n %}

{% block title %}
     Search results for {{ q }}
{% endblock title %}

{% block page-title %}{% endblock page-title %}

<div class="content-main">
{% block content %}
    {% placeholder content-main %}
    {% spaceless %}

    {% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}

    <form action="." method="post">
        <style type="text/css">
            @import url(http://www.google.com/cse/api/branding.css);
        </style>
        <div class="cse-branding-logo">
            <img src="http://www.google.com/images/poweredby_transparent/poweredby_FFFFFF.gif" alt="Google" />
        </div>
        <div class="cse-branding-text">
            Custom Search
        </div>
        {% for field in form %}
                <div class="form-error">{{ field.errors }}</div>
                <div class="form-left">
                    {{ field.label_tag }}{% if field.field.required %}<span class="form-required">*</span>{% endif %}
                </div>
                <div class="form-right">
                    {{ field }}
                </div>
                <div class="help_text">{{ field.help_text }}</div>
        {% endfor %}
        <div class="gsc-branding-text">powered by</div>
        <div class="gsc-branding-img-noclear"><img src="http://www.google.com/uds/css/small-logo.png" class="gsc-branding-img-noclear"></div>

        <input type="submit" name="submit" class="button" value="{% trans "Search" %}">
    </form>

    {% if results %}
    <h2>Search Results for {{ q|safe }}</h2>
    <ul>
        {% for result in results %}
        <li><a href="{{ result.unescapedUrl }}">{{ result.title|safe }}</a>
        <ul>
            <li>{{ result.content|safe }}
        </ul>
        {% endfor %}
    </ul>
    {% endif %}

    {% endspaceless %}
{% endblock content %}
</div>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.