Forum

Thread tagged as: Question, Problem, Configuration

Breadcrumbs In Microsite

I am using breadcrumbs as <?php perch_pages_breadcrumbs(array('template' => 'breadcrumbs.html')); ?>

I have a subdirectory I want to treat as a microsite. The path is for example myurl.com/photography/google/page1/page2

However say user is on page2 I want the breadcrumbs to show: google > page1 > page2

Currently they show photography > google > page1 > page2

Below is my breadcrumbs code

<perch:before>
<div class="l-submain no-padding-bottom">
<div class="g-breadcrumbs">
<div class="l-submain-h g-html i-cf">
</perch:before>
<span class="g-breadcrumbs-item">
<perch:if exists="perch_item_last">
<span class="g-breadcrumbs-item"><perch:pages id="pageNavText" /></span>
<perch:else />
<a href="<perch:pages id="pagePath" />" class="g-breadcrumbs-item"><perch:pages id="pageNavText" /></a><span class="g-breadcrumbs-separator">»</span>
</perch:if>
</span>
<perch:after>
</div>
</div>
</div>
</perch:after>
Nigel Coath

Nigel Coath 1 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You'd need to create a navigation group for your microsite and use that for the breadcrumbs.

Okay I found the documentation, say I have already created pages:

  1. How do I add them to a Navigation group?
  2. How do I edit the breadcrumbs code above to use the path from this Navigation group?
Duncan Revell

Duncan Revell 78 points
Registered Developer

  1. In the settings for each page, you can choose which navgroup the page belongs to.
  2. https://docs.grabaperch.com/functions/navigation/perch-pages-breadcrumbs/ explains how to add the navgroup to the options array.

Brilliant, thanks!

Do you know if there is a way to rename the starting link in a breadcrumb?

My problem is for management purposes in the Admin area, the "Home" page is called Adwords or Bing so I can easily identify it.

However whatever the page is called dictates the name of the link like: Adwords » Services » Test

Ideally I would like that to display as Home. Is this something to change in the breadcrumbs template, if so how? Or is there a way to have the Admin window use a name that is not the one that appears in the front end navigation?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Is this something to change in the breadcrumbs template, if so how?

Yes, you use perch:if to test for it and output an alternative.

Sorry to be so dense in my code its outputting correctly the path, but I dont want the root path to be called "Adwords" but "Home"

The only way I have managed that is to rename the page "Home" but then it will be hard to pick out in admin.

So is there a way to edit below to do this?

<perch:if exists="perch_item_last"> <span class="g-breadcrumbs-item"><perch:pages id="pageNavText" /></span> <perch:else /> <a href="<perch:pages id="pagePath" />" class="g-breadcrumbs-item"><perch:pages id="pageNavText" /></a><span class="g-breadcrumbs-separator">»</span> </perch:if>
Drew McLellan

Drew McLellan 2638 points
Perch Support

If the page is called 'Adwords' output 'Home' else output the page name.

<perch:if id="pageNavText" value="Adwords">
     Home
<perch:else />
     <perch:pages id="pageNavText" />
</perch:if>

So I did all this, sort of works. However I am not sure what is the problem, currently running 2.8.15.

When I reorder the Navigation Groups, the breadcrumbs completely disappear. I cannot get them back unless I delete the Navigation group and recreate.

Is this a bug or an issue with my install?

It seems to only work if I create the Navigation group in the correct order of page flow from creation.

Drew McLellan

Drew McLellan 2638 points
Perch Support

currently running 2.8.15

That's not a supported version of Perch. The only version of Perch 2 we still support is 2.8.34.

Well I updated to 2.8.34 and the problem is still there.

This is my diagnostics:

Perch: 2.8.34
Production mode: Production (100)
Installed apps: content (2.8.34), assets (2.8.34), categories (2.8.34), perch_forms (1.8.3), perch_mailchimp (2.0.1), perch_blog (4.6), perch_backup (1.2)
DB driver: PDO
DB tables: perch2_blog_authors (1), perch2_blog_categories (0), perch2_blog_comments (0), perch2_blog_index (436), perch2_blog_posts (7), perch2_blog_posts_to_categories (0), perch2_blog_posts_to_tags (26), perch2_blog_sections (1), perch2_blog_tags (22), perch2_categories (17), perch2_category_counts (2), perch2_category_sets (4), perch2_content_index (48956), perch2_content_items (6365), perch2_content_regions (452), perch2_forms (4), perch2_forms_responses (55), perch2_gallery_albums (0), perch2_gallery_image_versions (0), perch2_gallery_images (0), perch2_mailchimp_campaigns (1), perch2_mailchimp_history (1), perch2_mailchimp_log (30), perch2_mailchimp_stats (1), perch2_mailchimp_subscribers (23), perch2_menu_items (17), perch2_navigation (1), perch2_navigation_pages (10), perch2_page_templates (52), perch2_pages (90), perch2_resource_log (8973), perch2_resource_tags (0), perch2_resources (788), perch2_resources_to_tags (0), perch2_settings (50), perch2_user_passwords (0), perch2_user_privileges (47), perch2_user_role_privileges (15), perch2_user_roles (2), perch2_users (1)
Users: 1
PHPMailer: 5.2.21
App runtimes:
<?php
    $apps_list = array(
        'content',
        'categories',
        'perch_backup',
        'perch_blog',
        'perch_forms',
        'perch_mailchimp',
    );
?>
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins)
Scheduled tasks for perch_mailchimp: update_list_stats (60 mins)
Editor plug-ins: markitup
H1: ef3ca1529dd66d09ed20bd3d9baed647
L1: d1f571d362a7bd332b867d982b8f8207
F1: 6a33f95eca3667f9e0c39bf5ca2980fe
headerColour: #ffffff
content_singlePageEdit: 0
helpURL:
siteURL: /
hideBranding: 1
content_collapseList: 1
lang: en-gb
update_2.4.9: done
latest_version: 2.8.15
on_sale_version:
headerScheme: light
dashboard: 0
perch_mailchimp_api_key: d71df496c05664e2d2b3cb41a9595079-us9
perch_mailchimp_list_id: 167c08a418
perch_mailchimp_campaign_url: /mailchimp/campaign.php?s={campaignSlug}
perch_gallery_bucket_mode: single
perch_gallery_bucket: default
perch_blog_post_url: /news/{postSlug}
perch_blog_slug_format: %Y-%m-%d-{postTitle}
perch_blog_max_spam_days: 0
perch_backup_mysqldump_path:
hide_pwd_reset: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
perch_gallery_basicUpload: 0
perch_blog_comment_notify: 0
perch_mailchimp_secret: 7e8e1b83e8cca2d6804b087485e7f744
perch_mailchimp_update: 2.0
update_2.5.3: done
perch_blog_update: 5.0
perch_gallery_update: 2.8.5
update_2.6: done
update_2.6.3: done
update_2.6.5: done
update_2.6.6: done
update_2.7: done
update_2.7.1: done
update_2.7.2: done
update_2.7.3: done
perch_blog_akismet_key: 31ec70e74071
logoPath: /admin/resources/1468333949_logo_0.png
update_2.7.4: done
update_2.7.5: done
update_2.8.2: done
update_2.8.4: done
update_2.8.6: done
update_2.8.11: done
update_2.8.15: done
update_2.8.34: done
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: proc_admin1966
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: procreative_cms_2
PERCH_DB_PREFIX: perch2_
PERCH_TZ: UTC
PERCH_EMAIL_FROM: nigel@procreative.co.uk
PERCH_EMAIL_FROM_NAME: Nigel Coath
PERCH_LOGINPATH: /admin
PERCH_PATH: /var/www/vhosts/procreative.co.uk/httpdocs/admin
PERCH_CORE: /var/www/vhosts/procreative.co.uk/httpdocs/admin/core
PERCH_RESFILEPATH: /var/www/vhosts/procreative.co.uk/httpdocs/admin/resources
PERCH_RESPATH: /admin/resources
PERCH_HTML5: 1
PERCH_RUNWAY:
PERCH_ERROR_MODE: DIE
PERCH_DATE_LONG: %d %B %Y
PERCH_DATE_SHORT: %d %b %Y
PERCH_TIME_SHORT: %H:%M
PERCH_TIME_LONG: %H:%M:%S
PERCH_RUNWAY_ROUTED:
PERCH_STRONG_PASSWORDS:
PERCH_DEBUG:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /var/www/vhosts/procreative.co.uk/httpdocs/admin/templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_RWD:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_PARANOID:
PERCH_FORCE_SECURE_COOKIES:
PERCH_PASSWORD_MIN_LENGTH: 6
PERCH_MAX_FAILED_LOGINS: 10
PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR
PERCH_VERIFY_UPLOADS:
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
PERCH_SESSION_TIMEOUT_MINS: 20
HOSTING SETTINGS

PHP: 5.4.45
Zend: 2.4.0
OS: Linux
SAPI: cgi-fcgi
Safe mode: not detected
MySQL client: mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $
MySQL server: 5.5.37-cll-lve
Free disk space: 11.07 GB
Extensions: Core, date, ereg, libxml, openssl, pcre, zlib, bz2, calendar, ctype, hash, filter, ftp, gettext, gmp, SPL, iconv, pcntl, readline, Reflection, session, standard, SimpleXML, sockets, mbstring, tokenizer, xml, cgi-fcgi, mysqlnd, XCache, bcmath, curl, dba, dom, enchant, fileinfo, gd, imagick, imap, intl, json, ldap, exif, mcrypt, mysql, mysqli, odbc, PDO, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, redis, soap, sqlite3, sysvmsg, sysvsem, sysvshm, tidy, xmlreader, xmlrpc, xmlwriter, xsl, zip, XCache Cacher, ionCube Loader
GD: Yes
ImageMagick: Yes
PHP max upload size: 2M
PHP max form post size: 8M
PHP memory limit: 256M
Total max uploadable file size: 2M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: Yes
PATH: /usr/local/bin:/usr/bin:/bin
REDIRECT_STATUS: 200
UNIQUE_ID: WoMaZ38AAAEAAC8UPGoAAAAA
PP_CUSTOM_PHP_INI: /var/www/vhosts/system/procreative.co.uk/etc/php.ini
PP_CUSTOM_PHP_CGI_INDEX: plesk-php54-cgi
HTTP_HOST: procreative.co.uk
HTTP_X_REAL_IP: 217.39.75.123
HTTP_X_FORWARDED_FOR: 217.39.75.123
HTTP_X_ACCEL_INTERNAL: /internal-nginx-static-location
HTTP_CONNECTION: close
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_COOKIE: PHPSESSID=1g34hdjqn30g3dpmqh7rlhusm7; cmsa=1; phpMyAdmin=51bb48bbc207999eda420f5c542597ebb753a832
HTTP_UPGRADE_INSECURE_REQUESTS: 1
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/604.5.6 (KHTML, like Gecko) Version/11.0.3 Safari/604.5.6
HTTP_REFERER: https://procreative.co.uk/admin/core/settings/diagnostics/
HTTP_DNT: 1
HTTP_ACCEPT_LANGUAGE: en-gb
SERVER_SOFTWARE: Apache
SERVER_NAME: procreative.co.uk
SERVER_ADDR: 178.16.224.70
SERVER_PORT: 80
REMOTE_ADDR: 217.39.75.123
DOCUMENT_ROOT: /var/www/vhosts/procreative.co.uk/httpdocs
SERVER_ADMIN: nigel@procreative.co.uk
SCRIPT_FILENAME: /var/www/vhosts/procreative.co.uk/httpdocs/admin/core/settings/diagnostics/index.php
REMOTE_PORT: 44800
REDIRECT_QUERY_STRING: extended
REDIRECT_URL: /admin/core/settings/diagnostics/index.php
GATEWAY_INTERFACE: CGI/1.1
SERVER_PROTOCOL: HTTP/1.0
REQUEST_METHOD: GET
QUERY_STRING: extended
REQUEST_URI: /admin/core/settings/diagnostics/?extended
SCRIPT_NAME: /admin/core/settings/diagnostics/index.php
ORIG_SCRIPT_FILENAME: /var/www/cgi-bin/cgi_wrapper/cgi_wrapper
ORIG_PATH_INFO: /admin/core/settings/diagnostics/index.php
ORIG_PATH_TRANSLATED: /var/www/vhosts/procreative.co.uk/httpdocs/admin/core/settings/diagnostics/index.php
ORIG_SCRIPT_NAME: /phppath/cgi_wrapper
PHP_SELF: /admin/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1518541415.0515
REQUEST_TIME: 1518541415
Drew McLellan

Drew McLellan 2638 points
Perch Support

How are you adding the items to the group?

By selecting the checkbox in page options called Navigation groups. I added them in the order they flow and it turns out reversed, so going into the Navigation Group and reordering pages stops breadcrumbs displaying at all. Even just saving while in the reordering state without moving them around screws it up.

Is this some kind of permissions or database issue?

This is code in breadcrumbs:

<a href="<perch:pages id="pagePath" />" class="g-breadcrumbs-item"><perch:if id="pageNavText" value="Adwords">Home<perch:else /><perch:pages id="pageNavText" /></perch:if></a><span class="g-breadcrumbs-separator">»</span>

This is code on page:

<?php perch_pages_breadcrumbs(array('template' => 'breadcrumbs-adwords.html','navgroup' => 'adwords')); ?>
Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you show me the debug output from there page where the navigation isn't working?

Its below, however I think personally something is going on with the database?

Debug Message
[49] SELECT regionKey, regionHTML FROM perch2_content_regions WHERE regionPage='/photography/adw/services/cutout-photography.php' OR regionPage='*' ORDER BY regionPage DESC
[1] SELECT * FROM perch2_pages WHERE pagePath='/photography/adw/services/cutout-photography.php' LIMIT 1
Using template: /templates/pages/attributes/seo.html
[1] SELECT regionID, regionTemplate, regionPage, regionRev AS rev FROM perch2_content_regions WHERE regionKey='Company Details' AND (regionPage='/photography/adw/services/cutout-photography.php' OR regionPage='*')
[1] SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch2_content_index idx JOIN perch2_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch2_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='_order' WHERE ((idx.regionID=2 AND idx.itemRev=54)) AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval ORDER BY sortval ASC
[1] Using template: /templates/content/telephone.html
[1] SELECT pageID, pageParentID, pageDepth, pageTreePosition FROM perch2_pages WHERE pagePath='/photography/adw/services' OR pageSortPath='/photography/adw/services' LIMIT 1
[5] SELECT * FROM perch2_pages WHERE pageNew=0 AND pageHidden=0 AND pageTreePosition LIKE '000-011-007-002%' AND pageDepth >=3 AND pageDepth<=4 ORDER BY pageTreePosition ASC
[1] SELECT pageTreePosition FROM perch2_pages WHERE pagePath='/photography/adw/services/cutout-photography.php' LIMIT 1
[4] SELECT pageID FROM perch2_pages WHERE pageTreePosition IN ('000-011-007-002-001', '000-011-007-002', '000-011-007', '000-011', '000') ORDER BY pageTreePosition DESC
[4] Using template: /templates/navigation/submenu-level-1.html
[1] SELECT pageID, pageParentID, pageDepth, pageTreePosition FROM perch2_pages WHERE pagePath='/photography/adw/about-us' OR pageSortPath='/photography/adw/about-us' LIMIT 1
[7] SELECT * FROM perch2_pages WHERE pageNew=0 AND pageHidden=0 AND pageTreePosition LIKE '000-011-007-003%' AND pageDepth >=3 AND pageDepth<=4 ORDER BY pageTreePosition ASC
[1] SELECT pageTreePosition FROM perch2_pages WHERE pagePath='/photography/adw/services/cutout-photography.php' LIMIT 1
[4] SELECT pageID FROM perch2_pages WHERE pageTreePosition IN ('000-011-007-002-001', '000-011-007-002', '000-011-007', '000-011', '000') ORDER BY pageTreePosition DESC
[6] Using template: /templates/navigation/submenu-level-1.html
[1] SELECT regionID, regionTemplate, regionPage, regionRev AS rev FROM perch2_content_regions WHERE regionKey='Banner Image' AND (regionPage='/photography/services/cutout-photography.php' OR regionPage='*')
[1] SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch2_content_index idx JOIN perch2_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch2_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='_order' WHERE ((idx.regionID=792 AND idx.itemRev=4)) AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval ORDER BY sortval ASC
[1] Using template: /templates/content/banner_image.html
[1] SELECT groupID FROM perch2_navigation WHERE groupSlug='adwords' LIMIT 1
[1] SELECT np.pageTreePosition FROM perch2_navigation_pages np, perch2_pages p WHERE p.pageID=np.pageID AND np.groupID=8 AND (p.pagePath='/photography/adw/services/cutout-photography.php' OR p.pageSortPath='/photography/adw/services/cutout-photography.php') LIMIT 1
[3] SELECT p.*, np.* FROM perch2_navigation_pages np, perch2_pages p WHERE p.pageID=np.pageID AND np.groupID=8 AND p.pageNew=0 AND np.pageTreePosition IN ('000-000', '000') ORDER BY np.pageTreePosition
[3] Using template: /templates/navigation/breadcrumbs-adwords.html
[1] SELECT regionID, regionTemplate, regionPage, regionRev AS rev FROM perch2_content_regions WHERE regionKey='Introduction' AND (regionPage='/photography/services/cutout-photography.php' OR regionPage='*')
[1] SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch2_content_index idx JOIN perch2_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch2_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='_order' WHERE ((idx.regionID=793 AND idx.itemRev=4)) AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval ORDER BY sortval ASC
[4] Using template: /templates/content/introduction.html
[1] SELECT regionID, regionTemplate, regionPage, regionRev AS rev FROM perch2_content_regions WHERE regionKey='Price Table' AND (regionPage='/photography/services/cutout-photography.php' OR regionPage='*')
[2] SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch2_content_index idx JOIN perch2_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch2_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='_order' WHERE ((idx.regionID=794 AND idx.itemRev=16)) AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval ORDER BY sortval ASC
[6] Using template: /templates/content/price_tables.html
[1] SELECT regionID, regionTemplate, regionPage, regionRev AS rev FROM perch2_content_regions WHERE regionKey='Packages' AND (regionPage='/photography/services/cutout-photography.php' OR regionPage='*')
[nil] SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch2_content_index idx JOIN perch2_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch2_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='_order' WHERE ((idx.regionID=1093 AND idx.itemRev=0)) AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval ORDER BY sortval ASC
Template file not found: /var/www/vhosts/procreative.co.uk/httpdocs/admin/templates/content/.html
[1] SELECT regionID, regionTemplate, regionPage, regionRev AS rev FROM perch2_content_regions WHERE regionKey='Packages Images' AND (regionPage='/photography/services/cutout-photography.php' OR regionPage='*')
[nil] SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch2_content_index idx JOIN perch2_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch2_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='_order' WHERE ((idx.regionID=1094 AND idx.itemRev=0)) AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval ORDER BY sortval ASC
Template file not found: /var/www/vhosts/procreative.co.uk/httpdocs/admin/templates/content/.html
[1] SELECT regionID, regionTemplate, regionPage, regionRev AS rev FROM perch2_content_regions WHERE regionKey='Packages Info' AND (regionPage='/photography/services/cutout-photography.php' OR regionPage='*')
[nil] SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch2_content_index idx JOIN perch2_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch2_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='_order' WHERE ((idx.regionID=1095 AND idx.itemRev=0)) AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval ORDER BY sortval ASC
Template file not found: /var/www/vhosts/procreative.co.uk/httpdocs/admin/templates/content/.html
[1] SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch2_content_index idx JOIN perch2_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch2_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='_order' WHERE ((idx.regionID=2 AND idx.itemRev=54)) AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval ORDER BY sortval ASC
[1] Using template: /templates/content/contact_details_ppc.html
[1] SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch2_content_index idx JOIN perch2_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch2_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='_order' WHERE ((idx.regionID=2 AND idx.itemRev=54)) AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval ORDER BY sortval ASC
[3] Using template: /templates/content/about_us_photography.html

I checked the mysql database and changing the order or saving in the Navigation group definitely doing something to the database. It screws the following columns in "perch2 navigation_pages":

pageOrder pageDepth pageTreePosition

I can get it working by editing in the database using a screenshot of when it worked. I had to flush the navigation tables to get it working again.

Drew McLellan

Drew McLellan 2638 points
Perch Support

When you say screws, what change are you seeing?

It changes the numbers in these columns:

pageOrder pageDepth pageTreePosition

They then do not work.

I have found another way to achieve the breadcrumbs that seems to work, I have set the parent directory to hidden (its only a link) from navigation then:

<?php perch_pages_breadcrumbs(array('template' => 'breadcrumbs-adwords.html', 'include-hidden' => false)); ?>

and inside my main directory:

<?php perch_pages_breadcrumbs(array('template' => 'breadcrumbs-photography.html', 'include-hidden' => true)); ?>