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.
Is it possible to have the Masthead sit in the Top Pallet? Or, can I write text and place an image in the top pallet?
Last edited by pideja (2018-12-01 00:11:19)
Offline
Yes.
Masthead > Top Pallet Title : Visible on Desktop : on
Primary Masthead: Disable
This will put a Text masthead in the Top Pallet. If you’re using a graphic logo you’ll need to use phplugins and custom css
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
It works but what I'd really like would be to have a different text in the top pallet. Also, that site title that runs thru out the site, on all pages is nice and I like it. It's in the Masthead/Identity/Site title. So where and how do I write another line of text within the Top Pallet?
I'd like to put a graphic and some text. Probably I will have to create some sort of banner to place within that blue band that is the top pallet.
Last edited by pideja (2018-12-01 03:53:11)
Offline
Did you disable the primary masthead?
Did you set Top Pallet Title (in the Masthead section) to be visible on desktop?
You can put whatever text you like in Masthead > Identity > Site Title
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
I disabled the primary masthead.
I set Top Pallet Title (in the Masthead section) to be visible on the desktop. But then, the site title appears in the top pallet.
If I then disable the top pallet title and have the main Masthead in the Header i have, in Masthead > Identity > Site Title, the site title appears in blue is displayed, centered on the page. This I want.
I'd like a graphic + text in the Top Pallet. Can I design and place a banner in the Top Pallet?
This is an example pulled from another post in the Forum dating 09/09/2018 by Sven:
Last edited by pideja (2018-12-01 04:40:39)
Offline
When you opt to put the site title in the top Pallet, that site title becomes the 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
I'd like a graphic + text in the Top Pallet. Can I design and place a banner in the Top Pallet?
Yes. As mentioned above you need to do that with phplugins and custom css.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
This is an example pulled from another post in the Forum dating 09/09/2018 by Sven:
this looks like the site title and navigation are in the top pallet
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Just like my site.
Offline
only your site (this one I believe: https://pideja.ca/duc/) doesn't have the title in the top pallet and doesn't have the primary masthead disabled. Or am I missing something in what you want to do?
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
I created a banner and that's what I want to place in the top pallet. The site title is in blue on the black background. The banner should be my ID and sit at the top.
Maybe if I define that banner as a masthead, I could place the navigation either within the masthead or just below.
But then there is the question of the site title that I wish to maintain as a text line in blue.
Here is a mockup of what I am trying to do:
Last edited by pideja (2018-12-01 06:38:39)
Offline
You could use phplugins to replace the top pallet. Then put whatever you want in there as a site title.
Then just use the Primary masthead as you normally would.
I have a couple of examples using two different methods. They're Pangolin, but in a Backlight 1.2 site so the phplugins function would need to be updated for Backlight 2
http://pangolin.barbeephoto.com/top-pallet-image-logo/
http://pangolin.barbeephoto.com/logo-background/
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
You could use phplugins to replace the top pallet. Then put whatever you want in there as a site title.
Then just use the Primary masthead as you normally would.I have a couple of examples using two different methods. They're Pangolin, but in a Backlight 1.2 site so the phplugins function would need to be updated for Backlight 2
http://pangolin.barbeephoto.com/top-pallet-image-logo/
http://pangolin.barbeephoto.com/logo-background/
I'm trying to implement one of these php solutions but there is no effect on the page. You mention updating tp Backlight 2 but, in what way?
Offline
Here are the php and CSS I'm using:
PHP
function pallet_top_title()
{
echo '
<li class="logomark banniereDUC_logomark" style="float:left;">
<a href="#">
<ul>
<li style="opacity:.98; top: 0%; left: 0%; width: 50%; height: 50%"></li>
</ul>
<h1><strong>B</strong>acklight</h1>
</a>
</li>
';
return false;
} // END /**/
CSS
.page__pallet__top > .content > ul > li {
margin: 0;
height: 48px;
}
/*logo as background image*/
.top-pallet-logo {
background-image: url("https://pideja.ca/duc/backlight/designer/page/image/8");
background-repeat: no-repeat;
width: 192px;
height: 48px;
}
li.top-pallet-logo a {
display: block;
width: 100%;
height: 100%;
}
Note that "banniereDUC.png" is the image. The URL to this image in Backlight is: https://pideja.ca/duc//backlight/designer/page/image/8
But still, nothing shows up...
Offline
is Top Pallet Title set to be visible on desktop?
your html is strange. For example:
<ul>
<li style="opacity:.98; top: 0%; left: 0%; width: 50%; height: 50%"></li>
</ul>
what is this for? you have styling in the li item but there's no content.
also, you're applying a background image to the .top-pallet-logo class yet your html has no element with that class. (which is one reason nothing is showing up.)
It looks to me that you're using some of Matt's sample code for putting a ttg logo in your masthead. Why include:
<h1><strong>B</strong>acklight</h1> ?
try referring to one of the links to my test site that I posted above
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Frankly, I'm fumbling my way here...
Reverted to the suggested PHP code:
function ttg_pallet_top_title( $style, $path ) {
echo '
<li class="top-pallet-logo"><a href="https://pideja.ca/duc"></a></li>
';
return false;
and the CSS:
.page__pallet__top > .content > ul > li {
margin: 0;
height: 48px;
}
/*logo as background image*/
.top-pallet-logo {
background-image: url("https://pideja.ca/duc/backlight/designer/page/image/8");
background-repeat: no-repeat;
width: 400px;
height: 50px;
}
li.top-pallet-logo a {
display: block;
width: 100%;
height: 100%;
}
TOP PALLET has height on Desktop=ON.
Still no top pallet image.
But I get this error message: Unexpected error: syntax error, unexpected 'echo' (T_ECHO), expecting ';' or '{' in phplugins-pangolin-duc.php on line 30
Offline
You need to use the Backlight 2 form for the function:
function pallet_top_title () {
........
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
/* Top Pallet Banner */
function pallet_top_title($style, $path) {
echo'
<li class="top-pallet-logo"><a href="https://pideja.ca/duc"></a></li>
';
return false;
} // END
and
/* Top Pallet Banner */
.page__pallet__top > .content > ul > li {
margin: 0;
height: 48px;
}
/*logo as background image*/
.top-pallet-logo {
background-image: url("https://pideja.ca/duc/backlight/designer/page/image/8");
background-repeat: no-repeat;
width: 400px;
height: 50px;
}
li.top-pallet-logo a {
display: block;
width: 100%;
height: 100%;
}
return: Unexpected error: syntax error, unexpected 'function' (T_FUNCTION), expecting '{' in phplugins-pangolin-duc.php on line 23
Offline
No, you still need to change the function to comply with Backlight 2
This
function pallet_top_title() {
not this:
function pallet_top_title($style, $path) {
for more on this, see Daniel's sticky post in the Backlight 2 phplugins forum: http://community.theturninggate.net/vie … hp?id=8966
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
function pallet_top_title() {
echo'
<li class="top-pallet-logo"><a href="https://pideja.ca/duc"></a></li>
';
return false;
}
Tested with https://phpcodechecker.com/ and http://phptester.net/= no issues found. It's exactly as per Daniel's and your suggestion.
Still getting:
Unexpected error: syntax error, unexpected 'function' (T_FUNCTION), expecting '{' in phplugins-pangolin-duc.php on line 23
UPDATE: turned off PHP in Backlight and website displayed correctly, although there still was no logo in Top Pallet.
Last edited by pideja (2018-12-04 23:53:26)
Offline
Can you post the entire code in the phplugins file so we can see what might be on line 23
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Are you using the Backlight 2 phplugins file? The phplugins files from Backlight 1 won't work (see Daniel's post).
your phplugins file should start with this, the first 25 lines:
<?php
/*
* TTG Core Elements "PHPlugins" User Hooks v1.2 - initialization mainline
*
* developed by john bishop images (http://johnbishopimages.com)
* for Matthew Campagna of The Turning Gate (http://theturninggate.net)
*
*/
function user_load($style, $path) {
$g_tsvrl = explode(' ', $style); // Extract gallery type
define ('G_STYLE', strtoupper($g_tsvrl[1])); // and set global for later
$g_path = str_ireplace('\\','/',$path); // change \ to /
$chunks = explode('/',$g_path); // and put into array
define ('G_PATH', strtoupper($chunks[count($chunks)-2])); // gallery folder name is second to last
//define ( 'TTG_SITE', ''); // set new site root for navigation, resources, etc.
}
if (defined('BACKLIGHT_HOOK')) {
require_once(realpath(BACKLIGHT_HOOK).'/modules/module-designer/application/helpers/APHPlugins.php');
}
class PHPlugins extends APHPlugins
{
/*
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Here is the full PHP code:
<?php
/*
* TTG Core Elements "PHPlugins" User Hooks v1.2 - initialization mainline
*
* developed by john bishop images (http://johnbishopimages.com)
* for Matthew Campagna of The Turning Gate (http://theturninggate.net)
*
*/
function user_load($style, $path) {
$g_tsvrl = explode(' ', $style); // Extract gallery type
define ('G_STYLE', strtoupper($g_tsvrl[1])); // and set global for later
$g_path = str_ireplace('\\','/',$path); // change \ to /
$chunks = explode('/',$g_path); // and put into array
define ('G_PATH', strtoupper($chunks[count($chunks)-2])); // gallery folder name is second to last
//define ( 'TTG_SITE', ''); // set new site root for navigation, resources, etc.
}
if (defined('BACKLIGHT_HOOK')) {
require_once(realpath(BACKLIGHT_HOOK).'/modules/module-designer/application/helpers/APHPlugins.php');
}
class PHPlugins extends APHPlugins
{
/*
/* Top Pallet Banner */
function pallet_top_title() {
echo'
<li class="top-pallet-logo"><a> href="https://pideja.ca/duc"</a></li>
';
return false;
}
// END/**/
/* Top Pallet Banner */
function pallet_top_title() {
echo'
<li class="top-pallet-logo"><a> href="https://pideja.ca/duc"</a></li>
';
return false;
}
// END/**/
But, in the meantime, I turned off the PHP and altered the CSS like this:
/* Top Pallet Banner */
.page__pallet__top > .content > ul > li {
margin: 0;
height: 48px;
}
/*logo as background image*/
.page__pallet__top {
background-image: url("https://pideja.ca/duc/backlight/designer/page/image/8");
background-repeat: no-repeat;
width: 1920px;
height: 50px;
}
li.page__pallet__top-logo a {
display: block;
width: 100%;
height: 100%;
}
Good, not great: it doesn't look responsive. At smaller sizes than 1920, I lose the navigation buttons. Also, in Mobile sizes, the menu being left oriented sits on top of the logo-banner.
The modified the PHP works fine. Now the site displays but the navigation is still not responsive.
Last edited by pideja (2018-12-05 00:34:24)
Offline
Just noticed that if I change the width in
.page__pallet__top {
background-image: url("https://pideja.ca/duc/backlight/designer/page/image/8");
background-repeat: no-repeat;
width: 1440px;
height: 50px;
}
The whole Top pallet changes size, but not the logo! Is it because the logo is a background? Why isn't the top pallet responsive when the logo is applied to it?
When both the CSS and the PHP are turned off, the top pallet (with the navigation) is responsive. But alas, no logo.
Last edited by pideja (2018-12-05 00:52:27)
Offline
is that the entire phplugins file? It's missing something at the end:
} ?>
if you're going to use phplugins I suggest using one of the existing files that Matt's included in /backlight/custom/phplugins/.
And only add or remove code in the USER section. Leave everything else as is.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline