-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Description
Hi,
i would like to use the imagestore app inside my small django cms project. After executing the tutorial i get really fast a good result. The only problem i run into is that the javascript snippet inside the template imagestore_album.html throughs an error. It's not able to find the CMS object (unresolved reference).
So i take a look at your application and found a solution for me by modify the template. The difference is the usage of sekizai and the django cms predefined block tags.
{% load thumbnail %}
{% load sekizai_tags %}
{% load staticfiles %}
{% addtoblock "css" %}
<link rel="stylesheet" href={% static "css/prettyPhoto.css" %} type="text/css" media="screen" title="prettyPhoto main stylesheet" charset="utf-8" />
{% endaddtoblock %}
<div id='gallery'>
{% for image in album.images.all %}
{% thumbnail image.image "120x120" crop="center" as im %}
{% thumbnail image.image "600x600" as full %}
<a rel='gallery[pp_gal]' href="{{ full.url }}">
<img class="preview" {% if image.title %} alt="{{ image.title }}" {% endif %} src="{{ im.url }}">
</a>
{% endthumbnail %}
{% endthumbnail %}
{% endfor %}
{% addtoblock "js" %}
<script type="application/javascript" src={% static "js/jquery.prettyPhoto.js" %}></script>
<script type="text/javascript" charset="utf-8">
CMS.$(function() {
$("a[rel^='gallery']").prettyPhoto({
allow_resize: true,
changepicturecallback: function() {
$(".pp_overlay").css("height", $(document).height());
}
});
});
</script>
{% endaddtoblock %}
</div>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels