I’ve replaced the site title with an image in the primary masthead and then enabled the secondary masthead to display the site title. But, if I have a tagline configured then the tagline appears on both mastheads and I can’t find a way to suppress it, ideally from the primary masthead.
I know I could just add the site title (and even the tagline) to the image but I’d prefer to keep them as text if I can to make it easier to make changes I continue to develop the website.
I dug deeper. I found that Kookaburra allows enabling/disabling the tagline independently for the primary and secondary header, but I’m using Pangolin.
In Pangolin, if the tagline is set in the Identity section then it appears in both the primary and secondary mastheads. There is no control within the mastheads to enable/disable the tagline. The only tagline setting within the mastheads is the font size.
I would actually like to use Kookaburra but there is no support for Kookaburra in the WP module yet.
Ok, with some more digging and I was able to get the behaviour I want with some code changes (although I hate modifying the code). Here are the changes that I made:
backlight/modules/pangolin-page/engine.xml:
1392a1393,1398
> <boolean id="masthead.primary.tagline.on">
> <title>Enable Tagline</title>
> <description><![CDATA[If a tagline value is set, display the tagline in the primary masthead.]]></description>
> <value>off</value>
> </boolean>
>
1736a1743,1748
>
> <boolean id="masthead.secondary.tagline.on">
> <title>Enable Tagline</title>
> <description><![CDATA[If a tagline value is set, display the tagline in the secondary masthead.]]></description>
> <value>off</value>
> </boolean>
Potentially yes, but that’s a less general solution and makes it harder to change later or to create new templates that may need different behaviour (although that’s unlikely). If TTG chooses to adopt my solution it provides a simple fix for anyone who runs into this.
But TBH, I hadn’t considered a custom CSS option, so thank-you for pointing it out. I’ll have to look into how Pangolin Supports that.
Before I retired, I was an embedded systems developer (no UI) and later a backend developer for most of my career so I have a tendency to jump to the code before I get into frontend stuff like CSS.
Agreed which is why I said I hate modifying the code. Fortunately, they are simple changes so if I need to redo them, I can.
Custom css is supported quite well and is easy to implement. You could create a css file that contains code to hide the tagline and assign it to a page template. Then assign that page template to pages/albums/sets that need the tagline suppressed.
I’ve just started using Backlight again after several years of ignoring my website. I’m mostly rebuilding from scratch but want to preserve my blog which is in Wordpress. I’m using Pangolin for 2 reasons:
the WP add-on does not (and according to another thread probably never will) support Kookaburra;
your documentation suggests Pangolin should still be used by default since Kookaburra is a work-in-progress.
Well, I’d argue about that. I agree that it’s the best solution given the existing code without modifications, but it’s a hard-coded solution that only solves the problem for one person. TTG adopting the changes in the code base (or making their own) solves the problem for all who might run into it.
The custom CSS also isn’t that straightforward. The tagline uses the same “site_tagline” class in both the primary and secondary mastheads, so I can’t simply target that class in the CSS to hide it. I need to target the “site_tagline” class within the “masthead_primary” class to only hide the tagline in the primary masthead. Yes, I know it can be done but I’ll need to refresh my CSS knowledge to remember how to do it. It’s just another layer of complexity for people who may have a more casual CSS understanding (like me).
Yeah, I hear ya. I made the default value for the switches to be off, which was not the best choice and will break existing sites. But if the defaults are changed to on then that’s the same as the current behaviour so shouldn’t break anything.