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.
I am using the flip gallery for my home page. So I want to use a simpler masthead on the flip gallery than the other pages.
I had solved this problem, well, Matthew or Rod told me how, with CE3, using a php plugin, but using that solution doesn't seem to work now. I think it probably has something to do with the name of the page or the way the new masthead is built. Anyway, I would most appreciate it if anyone could give me any guidance.
This is what I had for CE3, with the changes I tried making to adapt it to CE4. I moved the image to the right folder on the server.
// Different identity plate for Home page
function ttg_header_masthead( $style, $path ) {
if (G_STYLE == 'TTG CE4-Pages-home 4.0') {
echo '
<img id="identity-plate" src="/lib/images/identity2.png" width="960" height="140" alt="Hummingbird Photographics" />
';
return false;
}
return true;
} // END
I tried various names in the G_STYLE line, but nothing worked.
TIA,
Jon
Jon Brehaut
www.hummingbirdphotographics.com
Offline
the thing with the flip gallery is that it's not the traditional Pages home page and it doesn't have that hook.
In fact, it looks like the only hook on the flip index.php page is for ttg_head_end.
So you can't do the replacement with phplugins.
But you could use the "Allow Page Replacement by CE4 Publisher" feature in Pages and use Stage configured for a flip gallery as the template for the Home page, using a new masthead.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
So CE4 is different in this respect than CE3, which had a hook? Shucks. It was such an easy way to add flexibility to Pages.
OK. I guess I will have to start over again with the home page.
Jon Brehaut
www.hummingbirdphotographics.com
Offline
CE4's normal home page has the hook (as does the rest of the CE4 pages). The Flip gallery is not the normal home page, it completely replaces the home page (or whatever page you've assigned the Pages gallery to)
you actually had the hook wrong anyway. here's the list of Pages hooks
CE4-PAGES-HOME
CE4-PAGES-GALLERIES
CE4-PAGES-SERVICES
CE4-PAGES-INFO
CE4-PAGES-ABOUT
CE4-PAGES-CONTACT
http://ce4.theturninggate.net/docs/doku … e4_engines
in the flip gallery, the identityplate.png is placed in a div with an id and class of ttg_identity. Either the id or class styling then positions the image on the page.
I suppose after exporting the page you could edit index.php and change the image's file name from identityplate.png to identity2.png
it's near the bottom of the file so should be easy to find
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Jon, instead of replacing the masthead of the flip gallery, you could leave that one alone and replace the masthead on all other pages.
Maybe something like this:
function ttg_header_masthead( $style, $path ) {
if (G_STYLE != 'CE4-PAGES-HOME) {
echo '
<img id="identity-plate" src="/lib/images/identity.png" width="960" height="140" alt="Hummingbird Photographics" />
';
return false;
}
return true;
} // END
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline