Forum

Thread tagged as: Question

Breadcrumbs - how to add pages to navigation

Continuation of post on old forum :

I'm having problems getting the breadcrumbs to show as I expected/at all.

Drew suggested adding post to navigation - how do I do that?

Also, is there a way of showing Home>>News rather than just News >>

Thanks

OLD POST :

I'm having problems getting the breadcrumbs to show as I expected/at all.

I've added <?php perch_pages_breadcrumbs(); ?>

On a standard page I wanted to show Home >> News, but it only shows News

On my post page, it doesnt show at all.

It looks good on https://www.rotorvista.co.uk on Show and Tell so I know it must be possible!

Many thanks

Cow-shed 19 Jun 2014, 11:09 AM Has your post page been added to the navigation?

cow shed

cow shed 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

The breadcrumbs are just a navigation function, so they output whatever Perch sees as the path to that page within the navigation.

Is your 'News' section the Blog app?

If so, under News, click New subpage, enter the name of your post page, and select that it already exists.

I cant seem to add the post page to the navigation. Can I send you a screen shot of how I've tried to add it as I must have done something wrong.

My problem in summary :

I can get <?php perch_pages_breadcrumbs(); ?> to work when it is in a page within my menu - eg my news page.

However, I cant get it to show on my post.php pages.

Post.php is called from 3 pages within the site (agenda, minutes and planning). The blog posts display ok, but the breadcrumbs dont. You suggest adding the post.php as a subpage - so I have added it under planning as a subpage but that doesnt make any difference. (Location path ../blog/post.php, parent page : planning, master : default, etc

The code is below, but when i check the code for post.php in source view, the breadcrumbs is missing (it shows fine under my news.php page).

<div id="page-column-wide"> <?php perch_pages_breadcrumbs(); ?> <?php perch_blog_post(perch_get('s')); ?> </div>

Many thanks

Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you add debug to the page and let me know what it outputs?

DIAGNOSTICS:
SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r
WHERE u.roleID=r.roleID AND u.userEnabled='1' AND u.userID=1 AND u.userHash='2d7f1f0132b8654467a8492878e0274f'
LIMIT 1
UPDATE perch2_users SET userHash='6cfbed90795c48943e69f438c6bb4987' WHERE userID=1
SELECT p.privKey FROM perch2_users u, perch2_user_role_privileges rp, perch2_user_privileges p
WHERE u.roleID=rp.roleID AND rp.privID=p.privID AND u.userID=1
SELECT * FROM (SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID
SELECT * 
FROM perch2_pages
WHERE pageID=46
LIMIT 1
SELECT * FROM perch2_content_regions WHERE pageID='46' AND regionPage!='*' ORDER BY regionOrder ASC
SELECT COUNT(*) FROM perch2_content_items
WHERE itemJSON!='' AND regionID='133' AND itemRev='5'
SELECT COUNT(*) FROM perch2_content_items
WHERE itemJSON!='' AND regionID='134' AND itemRev='1'
SELECT COUNT(*) FROM perch2_content_items
WHERE itemJSON!='' AND regionID='135' AND itemRev='0'
SELECT COUNT(*) FROM perch2_content_items
WHERE itemJSON!='' AND regionID='127' AND itemRev='1'
SELECT COUNT(*) FROM perch2_content_items
WHERE itemJSON!='' AND regionID='136' AND itemRev='6'
SELECT COUNT(*) FROM perch2_content_items
WHERE itemJSON!='' AND regionID='137' AND itemRev='1'
Queries: 13

Does this help?

Drew McLellan

Drew McLellan 2638 points
Perch Support

No, I can't see anything untoward there.

Ok, so my problem is that i need to add some way for the user to navigate back to the blog list of posts from within a post. I wanted to use breadcrumbs, but breadcrumbs dont show up from within a post and there doesnt seem to be a reason (nothing untoward). So is there anyway I can do it?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you using navgroups or anything like that? Anything else you can tell me?