Support community for TTG plugins and products.
NOTICE
The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.
This forum is now closed, and exists here as a read-only archive.
You are not logged in.
Pages: 1
I wasn't sure where to post this. I have created menu items that are shortcuts to a keyword search. I have a phplugin that removes the block on the search page so that the view looks like a standard gallery page. A couple of questions:
Would it be possible to create a dynamic title for the page based on the search term?
Would it be possible to still have a normal search show up with the block?
Here is a link: https://www.montetrumbull.com/. The galleries I am referring to are under Location, Season, and Aspect. Things are still under construction!
Thanks - Monte
Monte Trumbull
https://www.montetrumbull.com/
Offline
I realized that I was removing the block on all pages after posting that. I thought the following would target just the Search page which uses the template named "search".
// Search page //
function ttg_block_top( $style, $path ) {
if (G_TEMPLATE == 'search') {
echo '
BLOCK
';
return false;
}
} //END
Monte
Monte Trumbull
https://www.montetrumbull.com/
Offline
try adding return true; after the first closing curly brace.
// Search page //
function ttg_block_top( $style, $path ) {
if (G_TEMPLATE == 'search') {
echo '
BLOCK
';
return false;
}
return true;
} //END
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Hey Monte, I like your approach and this is something I have been thinking of doing for a while.
On my site I currently use ''if (ALBUMTITLE == 'Search Results' )'' to detect the search page.
Another thought I had, but never really tried, is locating the search page somewhere else and make a 'gallery' of search pages. Something like this
stock/location <- regular gallery page
stock/location/a <- search page
stock/location/b <- search page
stock/location/c <- search page
With this scheme, it should be possible to create the page title from the ''CURRENTPAGEURL'' or ''G_PATH''.
Again, these hierarchical search galleries might be wishful thinking.... Search performance might be something else to consider as well.
Best
Daniel
Last edited by Daniel Leu (2016-03-30 09:24:17)
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
Thanks Rod, that worked perfectly.
Thanks for the ideas Daniel. I will look into that.
Monte
Monte Trumbull
https://www.montetrumbull.com/
Offline
Pages: 1