ZenphotoCMS Forum
link to search results from image page - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: link to search results from image page (/thread-11359.html)



link to search results from image page - underscore978 - 2013-09-15

i am trying to create a theme and i would like your help with the syntax of a link.
when i do an image search, results come up in the search page and from there you can click any image thumb and take you to the image page.
I would like to have a custom link on the image page that can take you back to the search results page where the image came from but im not very familiar with php syntax so pls help ...
thank you




link to search results from image page - fretzl - 2013-09-15

Maybe you can use the printSearchBreadcrumb() function.
http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functionprintSearchBreadcrumb




link to search results from image page - underscore978 - 2013-09-15

is there a way to do it with "




link to search results from image page - acrylian - 2013-09-15

No, search results are not defined by link but by context stored in cookies/sessions. A direct link would always be the link to the acutal place within an album.




link to search results from image page - underscore978 - 2013-09-15

ok.
is there a way then to make the printSearchBreadcrumb() function come up with a different word other that Search ?




link to search results from image page - acrylian - 2013-09-15

See the parameters: http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functionprintSearchBreadcrumb

We could probably help more if we would better understand what exactly you are trying to do on your theme.




link to search results from image page - underscore978 - 2013-09-15

as i said i'm not familiar with php so not sure how parameters work..
right now in the "image page" i have

printParentBreadcrumb("", " | ", " | ");

which gives a link with the word "Search" which takes you to the search results page. (that's what i want)
but instead of the word "Search" i would like to have something else there because the site im making it is not on the english language..




link to search results from image page - acrylian - 2013-09-15

If you are trying to do your own custom theme you should get familiar with at least the basics of PHP. That is not avoidable. There is a tutorial how to read the functions documentation on the user guide: http://www.zenphoto.org/news/how-to-read-the-zenphoto-functions-guide

The 3rd and 4th parameter determine the name of the link in the breadcrumb.

Otherwise you will have to create your own custom function.




link to search results from image page - sbillard - 2013-09-15

Actually, you can make an href link for a search. But of course you will have to become familiar with the parameters to the search engine.

In its simplest case, if you want to just link to a "standard" search on a simple target the link would be:
.../page/search/[i]target[/i]
but you can also add parameters to the link for instance what search fields, etc.

No documentation on this that I remember but the constructor for the search engine will give you clues. Of course, that requires probably a bit more than even basic PHP to interpret.