Задать вопрос

Тел: +7 965 3737 888

429

Просмотров

1

Ответов

AddThis Social Networking TemplateTag

<p>Code to add an 'AddThis' button to your blog posts.</p>
<p>Simply do:</p>
<p>{% add_this post.title post.get_absolute_url %}</p>
<p>Also, specify your ADD_THIS_USERNAME to your settings.</p>
&lt;!-- blog/add_this.html --&gt;
&lt;script type="text/javascript"&gt;var addthis_pub="{{ username }}";&lt;/script&gt;
&lt;a href="http://www.addthis.com/bookmark.php" onmouseover="return addthis_open(this, '', '{{ site.domain }}{{ url }}', '{{ site.name }} - {{ title }}')" onmouseout="addthis_close()" onclick="return addthis_sendto()"&gt;
&lt;img src="http://s7.addthis.com/static/btn/lg-addthis-en.gif" width="125" height="16" border="0" alt="" style="border:0"/&gt;&lt;/a&gt;
&lt;script type="text/javascript" src="http://s7.addthis.com/js/152/addthis_widget.js"&gt;&lt;/script&gt;

Вопрос полезен? Да0/Нет0
file_5126.py(371.0б)
None

Ответы (1):

Ответkenbolton:09.06.2009
Ответ полезен? Да0/Нет0

the signature for the add_this() function is: (url,title)

the templatetag example has them reversed: {% add_this post.title post.get_absolute_url %}.