Hi,
I’m starting work on a new site which I would, ideally, like to use Revolution for - mainly because it’s where MODx is heading, but also because the site needs two localized versions, and also requires a French version, which Contexts seem to be ideal for.
However, the design calls for search results to be presented with image thumbnails alongside the summary (as well as having pages aggregated with image thumbnails shown in a similar style) - is this kind of functionality possible with Revo’s search options (and/or getResources?)? I have looked at Simple Search and MODx Search, but there is no documentation describing this.
I’ve made several sites in Evo and managed to get this functionality working quite easily with AjaxSearch and Ditto respectively - can someone tell me if it would be better to stick with Evo at the moment if I need to achieve this?
Sure you can do it with getResources including TVs in you snippet call and template!
Snippet call :
[[!getResources? &parents=`[[*id]]` &limit=`0` &includeContent=`1` &includeTVs=`1` &tpl=`ListeMembresTpl` ]]
Template :
<li>
<a href="[[~[[+id]]]]" title="Consulter la fiche de [[+pagetitle]]">
[[!If? &subject=`[[+tv.ImageTV]]` &operator=`notempty` &then=`<img class="Preload" src="[[+tv.ImageTV:phpthumbof=`&w=100&zc=1`]]" title="" alt=""/>` &else=`<img class="Preload" src="assets/templates/elpm/images/ELPM-PhotoManquante.jpg" title="" alt=""/>`]]
</a>
<div>
<h1>
<a href="[[~[[+id]]]]" title="Consulter la fiche de [[+pagetitle]]">
[[+pagetitle]]
</a>
</h1>
<p>[[+tv.ContenuTV]]</p>
</div>
<br/>
</li>
in this template, you have two interesting options :
- phpthumb on the image
- if the image doesn’t exists, remplace it by generic one
Hoping it helps you
Equilibre Webdesign - Conception et r
That’s good to hear, and looks pretty simple too - i’ll look into this further. I think I might still run into an issue with the search issue though.
Thanks for your reply, it’s much appreciated.