Community @ The Turning Gate

Support community for TTG plugins and products.

You are not logged in.

#1 2018-09-02 04:31:02

zippo
Member
From: Germany
Registered: 2018-09-01
Posts: 14
Website

Title of Album in the masthead

Is there a way to put automatically the title of an album in the masthead before the COMPANY_NAME?
Thanks in advance for your help!
Zippo

Offline

#2 2018-09-02 05:18:03

Matthew
Administrator
From: Seoul, South Korea
Registered: 2012-09-24
Posts: 5,456
Website

Re: Title of Album in the masthead

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?


Campagna Pictures, http://campagnapictures.com
The Turning Gate, http://theturninggate.net

Offline

#3 2018-09-02 05:46:17

zippo
Member
From: Germany
Registered: 2018-09-01
Posts: 14
Website

Re: Title of Album in the masthead

Thanks for your response!
I know how to replace the mast head via PHPlugin, but I don’t know how to address a variable for the album title.

Offline

#4 2018-09-02 07:00:38

zippo
Member
From: Germany
Registered: 2018-09-01
Posts: 14
Website

Re: Title of Album in the masthead

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

#5 2018-09-03 06:54:04

Matthew
Administrator
From: Seoul, South Korea
Registered: 2012-09-24
Posts: 5,456
Website

Re: Title of Album in the masthead

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>';
	}

Campagna Pictures, http://campagnapictures.com
The Turning Gate, http://theturninggate.net

Offline

#6 2018-09-03 07:13:48

zippo
Member
From: Germany
Registered: 2018-09-01
Posts: 14
Website

Re: Title of Album in the masthead

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

#7 2018-09-03 09:25:02

Matthew
Administrator
From: Seoul, South Korea
Registered: 2012-09-24
Posts: 5,456
Website

Re: Title of Album in the masthead

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.


Campagna Pictures, http://campagnapictures.com
The Turning Gate, http://theturninggate.net

Offline

#8 2018-09-03 17:07:39

zippo
Member
From: Germany
Registered: 2018-09-01
Posts: 14
Website

Re: Title of Album in the masthead

OK! i think I have to wait then. Thank you for your effort!
Zippo

Offline

Board footer

Powered by FluxBB