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
Not via the template configuration, but could probably be accomplished using PHPlugins and jQuery. Do you have any level of comfort with either of these things, or would you require assistance with that?
Offline
My current replacement via PHPplugin looks like this:
function ttg_header_top( $style, $path ) {
echo '
<h1><a href="start.html">designladen.com – Fotos</a></h1>
';
return false;
}
How do I insert a variable für the album title?
Thank you!
Offline
Untested, but I believe this should work:
if ($this->hasAlbum()) {
echo '<p>';
echo 'Album Title: '.$this->album->getTitle().'<br/>';
echo 'Album Description: '.$this->album->getDescription().'<br/>';
echo 'Number of photos: '.$this->album->getNumberOfPhotos().'<br/';
echo '</p>';
}
Offline
Thanks a lot! How do I integrate this in my header function?
function ttg_header_top( $style, $path ) {
echo '
<h1><a href="start.html">designladen.com</a></h1>
';
return false;
}
All my tries produce errors like "Using $this when not in object context …"
i’m unfortunately not a great PHP-geek … :-/
Last edited by zippo (2018-09-03 08:04:23)
Offline
My apologies, but massive brain far. This is PHPlugins functionality coming in Backlight 2. I don't think the Album Title is accessible this way in Backlight 1.
If you can wait, this will be easier to do when Backlight 2 is released and you've upgraded.
If you need this now, then you will probably need to use jQuery to find the album title elsewhere on the page, then append it to the header. How to find it with jQuery is semi-dependent on your template configuration, so I would need to see a link to one of your galleries in order to advise you.
Offline
Pages: 1