issue118, fix using variable name for search.tpl and photo_index.tpl twice