Community @ The Turning Gate

Support community for TTG plugins and products.

You are not logged in.

#1 2018-02-03 20:30:10

markh
Member
From: Center of The US
Registered: 2012-09-24
Posts: 303
Website

Can't seem to get breadcrumbs working for non-gallery pangolin pages

I've been fooling around with Daniel's method of adding breadcrumbs to standard pangolin pages without much luck. I've basically copied and pasted the code from here: http://community.theturninggate.net/vie … hp?id=8430 to my custom phplugins file, ftp'd it to the server, cleared the template and browser caches, gave it a "hail-Mary" an sent it on its way. Phplugins is enabled in the page template and the php file it points to is correct.
Site is at https://markhoffmanphotography.com The pages in question are Services, About and Contact.
Tried changing the page reference in the code to an absolute address but that had no effect.
Anyone else using this code who has run into this?
Mark

Offline

#2 2018-02-03 22:45:34

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 14,238
Website

Re: Can't seem to get breadcrumbs working for non-gallery pangolin pages

Make sure that the page_match variables match your url setup.
Daniel’s code calls for the url to be /services.php.
Your site looks like it’s set up so the url in the page_match variable would be /services/ (or services/index.php)


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Pangolin test site, Backlight 1.1.1 test site

Offline

#3 2018-02-04 03:39:58

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 850
Website

Re: Can't seem to get breadcrumbs working for non-gallery pangolin pages

rod barbee wrote:

Make sure that the page_match variables match your url setup.
Daniel’s code calls for the url to be /services.php.
Your site looks like it’s set up so the url in the page_match variable would be /services/ (or services/index.php)

As always, Rod has eyes of an eagle.....

If you go to https://markhoffmanphotography.com/services.php, breadcrumbs show!

So best is, to match for /services in order to catch both cases.


Daniel Leu | Photography   
DanielLeu.com

Offline

#4 2018-02-04 05:29:37

markh
Member
From: Center of The US
Registered: 2012-09-24
Posts: 303
Website

Re: Can't seem to get breadcrumbs working for non-gallery pangolin pages

Got it! Thanks. Simple when someone shows it to you.
Mark

Offline

#5 2018-02-04 07:25:10

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 850
Website

Re: Can't seem to get breadcrumbs working for non-gallery pangolin pages

smile


Daniel Leu | Photography   
DanielLeu.com

Offline

#6 2018-04-05 02:23:31

tmszewczuk
Member
From: Crossville, TN USA
Registered: 2015-06-14
Posts: 29
Website

Re: Can't seem to get breadcrumbs working for non-gallery pangolin pages

I am having the same issues and tried the solutions in this breadcrumb post.  My url format setting is /?page=about and the page_match=/?page=about.  The breadcrumb additions are on my test site, http://ttg-test.tomswarbirds.com. My custom php file is Myphplugins.php and is selected on my page advanced features.  Can you help or tell what's wrong?


Thomas Szewczuk
Website  Testsite
The nation which forgets its defenders will be itself forgotten - Calvin Coolidge, POTUS 1923 - 1929

Offline

#7 2018-04-05 04:52:17

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 14,238
Website

Re: Can't seem to get breadcrumbs working for non-gallery pangolin pages

Couple of questions:

I assume you're modifying one of the sample phplugins files?
If so, and if you're modifying one of the existing sample functions, did you delete the indicated lines before and after the function

/*DELETE THIS LINE

...your function...

DELETE THIS LINE*/


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Pangolin test site, Backlight 1.1.1 test site

Offline

#8 2018-04-05 05:38:20

tmszewczuk
Member
From: Crossville, TN USA
Registered: 2015-06-14
Posts: 29
Website

Re: Can't seem to get breadcrumbs working for non-gallery pangolin pages

I copied phplugins-pangolin-sample.php to Myphplugins.php, didn't modify any of the included functions and added to bottom of existing code from http://community.theturninggate.net/vie … hp?id=8430.  I did not see "DELETE THIS LINE*/" terminator. I did not remove anything.

FYI: I don't claim to be a php coder but more a "hack in the rough".  Right now I'm clueless.


Thomas Szewczuk
Website  Testsite
The nation which forgets its defenders will be itself forgotten - Calvin Coolidge, POTUS 1923 - 1929

Offline

#9 2018-04-05 07:30:30

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 14,238
Website

Re: Can't seem to get breadcrumbs working for non-gallery pangolin pages

Where at the bottom of the existing code? can you post it?

The existing functions are preceded by

/* DELETE THIS LINE

and followed by

// END /**/

If you pasted your code before that last */ then it's probably commented out and won't work.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Pangolin test site, Backlight 1.1.1 test site

Offline

#10 2018-04-05 11:00:15

tmszewczuk
Member
From: Crossville, TN USA
Registered: 2015-06-14
Posts: 29
Website

Re: Can't seem to get breadcrumbs working for non-gallery pangolin pages

Rod, thanks for the extra look!

I had an extra

 // END /**/  

after the snippets I added ( bottom of code page). I removed it and all works nice now!  Thanks!!

Last edited by tmszewczuk (2018-04-05 11:58:48)


Thomas Szewczuk
Website  Testsite
The nation which forgets its defenders will be itself forgotten - Calvin Coolidge, POTUS 1923 - 1929

Offline

#11 2018-04-05 13:45:21

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 850
Website

Re: Can't seem to get breadcrumbs working for non-gallery pangolin pages

Tom, a little observation: your background image on the test site loads very slowly and seems to be used on many pages. But since you use different templates, the image is loaded again and again and doesn't take advantage of caching. I would recommend to check 1) why you have so many different templates and 2) if you could make the background image a bit smaller. The file is 1.9MB. Since this is only for the background, a smaller size and decreased quality settings would be appropriate. Just my two cents!


Daniel Leu | Photography   
DanielLeu.com

Offline

#12 2018-04-05 21:13:50

tmszewczuk
Member
From: Crossville, TN USA
Registered: 2015-06-14
Posts: 29
Website

Re: Can't seem to get breadcrumbs working for non-gallery pangolin pages

Daniel, Thanks for taking a much needed 2nd look!  Initially, when I browsing showcase sites prior to purchase, I thought the base background would remain static and the content layer would scroll over it.  You're right, each menu change reloads everything. 

I'm using one template (dark starter) for all background consistency. Yes, it has a large image with a microbial mat overlay at 55% Opacity.  I can try resizing smaller but I tried this early on and was unsatisfied with the look on desktop. I'm basically using 4 templates: base, album, album set and landing.   I didn't think base wouid be reloading so I have no clue how to fix this or cache it.  Suggestions are most welcomed


Thomas Szewczuk
Website  Testsite
The nation which forgets its defenders will be itself forgotten - Calvin Coolidge, POTUS 1923 - 1929

Offline

#13 2018-04-12 07:01:16

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 850
Website

Re: Can't seem to get breadcrumbs working for non-gallery pangolin pages

Hi Tom,

I forgot that Backlight puts everything possible into one CSS file. But this CSS file is template AND module specific. So the CSS for a page is different than that for an Album Set. That's why your background image is reloaded.

But, you could disable the background image in your page template and add following code it to your custom.css:

.background__image 
{
	background-attachment: scroll;
	background-image: url('http://ttg-test.tomswarbirds.com/backlight/designer/?c=page&a=image&p1=10&433');
	background-position: center center;
	background-repeat: repeat;
	background-size: contain;
}

Since the custom.css file is identical for all your pages and galleries, your background image is only downloaded once and then afterwards served from the cache.


Daniel Leu | Photography   
DanielLeu.com

Offline

#14 2018-04-12 08:32:21

tmszewczuk
Member
From: Crossville, TN USA
Registered: 2015-06-14
Posts: 29
Website

Re: Can't seem to get breadcrumbs working for non-gallery pangolin pages

Daniel;
Yes, very much quicker!  I have your patch installed on both of my sites -- Thank You!  One question however, what is or better yet explain where you got the background image id -- database?


Thomas Szewczuk
Website  Testsite
The nation which forgets its defenders will be itself forgotten - Calvin Coolidge, POTUS 1923 - 1929

Offline

#15 2018-04-12 08:55:14

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 850
Website

Re: Can't seem to get breadcrumbs working for non-gallery pangolin pages

Hi Thomas,

I just copied the code from the Backlight generated CSS and didn't even pay that much attention to it... Otherwise I would have changed it to a fixed location. So please upload your image to something like /backlight/custom/pics/background.jpg. This way it doesn't break once you make a change in your design.


Daniel Leu | Photography   
DanielLeu.com

Offline

Board footer

Powered by FluxBB