Blog Sections Open

Showing TV-Based Images in AjaxSearch Results with phpThumb

How to display TV-based thumbnails inside AjaxSearch results when the raw image path comes from a TV.

AjaxSearch gets much more useful when the result template can show a thumbnail instead of plain text only. On Evolution CMS sites, that usually means pulling an image path from a TV and then resizing it before output.

The original configuration used AjaxSearch with TV support enabled:

[!AjaxSearch?
  &liveSearch=`1`
  &addJscript=`0`
  &jscript=`jquery`
  &tplAjaxResult=`oneResult`
  &withTvs=`image`
!]

Inside the result template, the TV value was available as [+as.image+]. The next step was feeding that path into phpThumb or a similar thumbnail helper.

The catch is timing and path reliability. Search results are often rendered in a different parsing context from full documents, so any image-processing call that assumes normal page rendering may need a cleaner absolute or base-relative path strategy.

Once that is handled, AjaxSearch can produce rich visual results without abandoning the existing Evolution content structure.

Newer post

Switching Shopkeeper Prices by Quantity with `OnSHKcalcTotalPrice`

How to swap between two TV-based prices in Shopkeeper depending on the ordered quantity.

Older post

Preselecting the Resource Template on New Document Creation in Evolution CMS

How to prefill the template field when opening the new document form in Evolution CMS.