|
From: | Christopher Allan Webber |
Subject: | Re: [GMG-Devel] PDF support |
Date: | Thu, 08 Nov 2012 16:57:50 -0600 |
User-agent: | mu4e 0.9.9-dev3; emacs 24.1.50.1 |
Sebastian Spaeth writes: > Christopher Allan Webber <address@hidden> wrote: >> > >>we would need to probably change this to something like: >> >> <a href="{{ entry_url }}"> >> {% if entry.media_files.has_key('thumb') %} >> <img src="{{ request.app.public_store.file_url( >> entry.media_files['thumb']) }}" /> >> {% else %} >> <img src="{{ request.staticdirect(entry.thumb_fallback) }}" /> >> {% endif %} >> </a> >> >>where we extended MediaEntry to have a thumb_fallback method that was >>able to check the media type's "default_thumb" attribute in the >>MEDIA_MANAGER. > > Would it not be nicer to have a "get_thumb_URL()" function in the > MediaEntry class to avoid putting all the complexity in the templates? > > Spaetz That would be a good idea.
[Prev in Thread] | Current Thread | [Next in Thread] |