Forum

Thread tagged as: Problem, Error, Configuration

Add New Category Template

Hi there,

I have created a category template copy and renamed it ready for me to edit, I try to select it in the back end and it defaults back to the standard.

Is this a bug?

On the latest version of Perch.

Regards

Alec Sharples

Alec Sharples 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

I try to select it in the back end and it defaults back to the standard

'It' being the select field, or the template in use somewhere?

Hi Drew,

Set options select field in the back end.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, I'll take a look.

Thank you, not sure if this is causing the issues with my items not displaying from category.php.

Could it?

Regards

Drew McLellan

Drew McLellan 2638 points
Perch Support

I wouldn't have thought so.

Ok,

I have this placed in my category.php

<?php
    if (perch_get('cat')) {
      perch_category(perch_get('cat'),array(
        'template'=>'category_single.html'
    ));
    perch_content_custom('Portfolio', array(
      'template' => 'portfolio_listing.html',
      'page'=>'/portfolio.php',
      'category' => perch_get('cat'),
    ));
    } else {
      perch_categories();
    }
    ?>

My items have yet to show up on /category/work/brand/

After following the video tutorial to get to grips with how it all works.

Regards

Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you including the set name in the category path?

Hi Drew,

<perch:categories id="work" label="Type of work" set="work" required="true">
      <perch:before>
        <h3>TEST cat links</h3>
        <ul class="tags">
      </perch:before>
          <li><a href="/category/<perch:category id="catPath" />"><perch:category id="catTitle" /></a></li>
      <perch:after>
        </ul>
      </perch:after>
    </perch:categories>

This is in portfolio_item.html

Drew McLellan

Drew McLellan 2638 points
Perch Support

So the value of perch_get('cat') is a full category path?

Hi,

Tried them all

category/work/web

work/web

Nothing is producing the items.

Drew McLellan

Drew McLellan 2638 points
Perch Support

What does debug show you?

What does your route look like?

DEBUG

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='b7ed939d7423ad3a5b0bd23b3b25435a' LIMIT 1
UPDATE perch2_users SET userHash='e3475a1d165c9790bff87e599590518f' WHERE userID=1
SELECT p.privKey FROM perch2_user_privileges p
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_content_regions WHERE regionID=92 LIMIT 1
SELECT * FROM perch2_pages WHERE pageID='13' LIMIT 1
SELECT * FROM perch2_content_items WHERE regionID=92 AND itemRev=269 AND itemID=71 ORDER BY itemOrder ASC
Using template: /templates/content/portfolio_item.html
INSERT INTO perch2_content_items (itemID, regionID, pageID, itemRev, itemOrder, itemJSON, itemSearch, itemUpdatedBy) SELECT itemID, regionID, pageID, 270 AS itemRev, itemOrder, itemJSON, itemSearch, 1 AS itemUpdatedBy FROM perch2_content_items WHERE regionID=92 AND itemRev=269 ORDER BY itemOrder ASC
REPLACE INTO perch2_resource_log (appID, itemFK, itemRowID, resourceID) SELECT cr.appID, cr.itemFK, c2.itemRowID, cr.resourceID FROM perch2_resource_log cr, perch2_content_items c1, perch2_content_items c2 WHERE cr.appID='content' AND cr.itemFK='itemRowID' AND cr.itemRowID=c1.itemRowID AND c1.itemID = c2.itemID AND c1.regionID=92 AND c2.regionID=92 AND c1.itemRev = 269 AND c2.itemRev = 270
SELECT itemRowID FROM perch2_content_items WHERE regionID=92 AND itemRev=270 ORDER BY itemOrder ASC
UPDATE perch2_content_items SET itemOrder=1000 WHERE itemRowID='1395'
UPDATE perch2_content_items SET itemOrder=1001 WHERE itemRowID='1396'
UPDATE perch2_content_regions SET regionLatestRev=270 WHERE regionID=92
SELECT regionRev FROM perch2_content_regions WHERE regionID=92
DELETE FROM perch2_content_items WHERE regionID=92 AND itemRev!=269 AND itemRev IN (SELECT itemRev FROM (SELECT DISTINCT itemRev FROM perch2_content_items WHERE regionID=92 ORDER BY itemRev DESC LIMIT 8, 99999) AS t2)
DELETE FROM perch2_resource_log WHERE appID='content' AND itemFK='itemRowID' AND itemRowID NOT IN (SELECT itemRowID FROM perch2_content_items)
SELECT * FROM perch2_content_items WHERE regionID=92 AND itemRev=270 AND itemID=71 ORDER BY itemOrder ASC
DELETE FROM perch2_resource_log WHERE appID='content' AND itemFK='itemRowID' AND itemRowID='1396'
SELECT * FROM perch2_resources WHERE resourceID='157' LIMIT 1
SELECT * FROM perch2_resources WHERE resourceAWOL=0 AND resourceParentID='157' AND resourceKey='thumb'
SELECT * FROM perch2_resources WHERE resourceAWOL=0 AND resourceParentID='157' AND resourceTargetWidth=548 AND resourceTargetHeight=200 AND resourceCrop=1 AND resourceDensity=1
INSERT IGNORE INTO perch2_resource_log(`appID`, `itemFK`, `itemRowID`, `resourceID`) VALUES('content','itemRowID',1396,157),('content','itemRowID',1396,158),('content','itemRowID',1396,165)
SELECT * FROM perch2_resources WHERE resourceID='157' LIMIT 1
SELECT * FROM perch2_resources WHERE resourceAWOL=0 AND resourceParentID='157' AND resourceKey='thumb'
INSERT IGNORE INTO perch2_resource_log(`appID`, `itemFK`, `itemRowID`, `resourceID`) VALUES('content','itemRowID',1396,157),('content','itemRowID',1396,158)
SELECT * FROM perch2_resources WHERE resourceID='161' LIMIT 1
SELECT * FROM perch2_resources WHERE resourceAWOL=0 AND resourceParentID='161' AND resourceKey='thumb'
INSERT IGNORE INTO perch2_resource_log(`appID`, `itemFK`, `itemRowID`, `resourceID`) VALUES('content','itemRowID',1396,161),('content','itemRowID',1396,162)
SELECT * FROM perch2_resources WHERE resourceID='154' LIMIT 1
SELECT * FROM perch2_resources WHERE resourceAWOL=0 AND resourceParentID='154' AND resourceKey='thumb'
INSERT IGNORE INTO perch2_resource_log(`appID`, `itemFK`, `itemRowID`, `resourceID`) VALUES('content','itemRowID',1396,154),('content','itemRowID',1396,155)
SELECT * FROM perch2_resources WHERE resourceID='159' LIMIT 1
SELECT * FROM perch2_resources WHERE resourceAWOL=0 AND resourceParentID='159' AND resourceKey='thumb'
INSERT IGNORE INTO perch2_resource_log(`appID`, `itemFK`, `itemRowID`, `resourceID`) VALUES('content','itemRowID',1396,159),('content','itemRowID',1396,160)
SELECT * FROM perch2_resources WHERE resourceID='163' LIMIT 1
SELECT * FROM perch2_resources WHERE resourceAWOL=0 AND resourceParentID='163' AND resourceKey='thumb'
INSERT IGNORE INTO perch2_resource_log(`appID`, `itemFK`, `itemRowID`, `resourceID`) VALUES('content','itemRowID',1396,163),('content','itemRowID',1396,164)
SELECT * FROM perch2_categories WHERE catID=4 LIMIT 1
UPDATE perch2_content_items SET itemJSON='{\"_id\":\"71\",\"title\":\"Compass Financial\",\"_title\":\"Compass Financial\",\"completeby\":\"Alex Devine & Mike McCoole\",\"desc\":{\"raw\":\"Ruthin-based financial planners Compass Financial offers its clients a professional and highly personalised service. We were asked to bring their brand identity into line, supply specially-printed hot-foil, debossed luxury cards and formulate a new secure website.\\r\\n\\r\\nResponsive Web Design\\r\\n---------------------\\r\\n\\r\\nOur web team were tasked to create a brand new fully responsive website, after our initial brief we began working on the design both our graphic designers and web developers used the already implemented brand palette to create a simple yet informative website.\",\"processed\":\"<p>Ruthin-based financial planners Compass Financial offers its clients a professional and highly personalised service. We were asked to bring their brand identity into line, supply specially-printed hot-foil, debossed luxury cards and formulate a new secure website.<\\/p>\\n<h2>Responsive Web Design<\\/h2>\\n<p>Our web team were tasked to create a brand new fully responsive website, after our initial brief we began working on the design both our graphic designers and web developers used the already implemented brand palette to create a simple yet informative website.<\\/p>\"},\"listimage\":{\"assetID\":\"157\",\"title\":\"Compass financial responsive web design\",\"_default\":\"\\/perch\\/resources\\/compass-financial-responsive-web-design.jpg\",\"bucket\":\"default\",\"path\":\"compass-financial-responsive-web-design.jpg\",\"size\":1403248,\"w\":1920,\"h\":1281,\"mime\":\"image\\/jpeg\",\"sizes\":{\"thumb\":{\"w\":\"150\",\"h\":\"100\",\"target_w\":150,\"target_h\":150,\"density\":2,\"path\":\"compass-financial-responsive-web-design-thumb@2x.jpg\",\"size\":15863,\"mime\":\"\",\"assetID\":\"158\"},\"w548h200c1\":{\"w\":\"548\",\"h\":\"200\",\"target_w\":\"548\",\"target_h\":\"200\",\"crop\":\"true\",\"density\":\"1\",\"path\":\"compass-financial-responsive-web-design-w548h200.jpg\",\"size\":31134,\"mime\":\"\",\"assetID\":\"165\"}}},\"gallery\":[{\"image\":{\"assetID\":\"157\",\"title\":\"Compass financial responsive web design\",\"_default\":\"\\/perch\\/resources\\/compass-financial-responsive-web-design.jpg\",\"bucket\":\"default\",\"path\":\"compass-financial-responsive-web-design.jpg\",\"size\":1403248,\"w\":1920,\"h\":1281,\"mime\":\"image\\/jpeg\",\"sizes\":{\"thumb\":{\"w\":\"150\",\"h\":\"100\",\"target_w\":150,\"target_h\":150,\"density\":2,\"path\":\"compass-financial-responsive-web-design-thumb@2x.jpg\",\"size\":15863,\"mime\":\"\",\"assetID\":\"158\"}}},\"alt\":null},{\"image\":{\"assetID\":\"161\",\"title\":\"Compass financial brand identity\",\"_default\":\"\\/perch\\/resources\\/compass-financial-brand-identity.jpg\",\"bucket\":\"default\",\"path\":\"compass-financial-brand-identity.jpg\",\"size\":211020,\"w\":1920,\"h\":1281,\"mime\":\"image\\/jpeg\",\"sizes\":{\"thumb\":{\"w\":\"150\",\"h\":\"100\",\"target_w\":150,\"target_h\":150,\"density\":2,\"path\":\"compass-financial-brand-identity-thumb@2x.jpg\",\"size\":10163,\"mime\":\"\",\"assetID\":\"162\"}}},\"alt\":null},{\"image\":{\"assetID\":\"154\",\"title\":\"IMac Mockup 4\",\"_default\":\"\\/perch\\/resources\\/imacmockup4.jpg\",\"bucket\":\"default\",\"path\":\"imacmockup4.jpg\",\"size\":491004,\"w\":1922,\"h\":1281,\"mime\":\"image\\/jpeg\",\"sizes\":{\"thumb\":{\"w\":\"150\",\"h\":\"99\",\"target_w\":150,\"target_h\":150,\"density\":2,\"path\":\"imacmockup4-thumb@2x.jpg\",\"size\":11251,\"mime\":\"\",\"assetID\":\"155\"}}},\"alt\":null},{\"image\":{\"assetID\":\"159\",\"title\":\"Compass financial debossed business cards\",\"_default\":\"\\/perch\\/resources\\/compass-financial-debossed-business-cards.jpg\",\"bucket\":\"default\",\"path\":\"compass-financial-debossed-business-cards.jpg\",\"size\":1232551,\"w\":1920,\"h\":1281,\"mime\":\"image\\/jpeg\",\"sizes\":{\"thumb\":{\"w\":\"150\",\"h\":\"100\",\"target_w\":150,\"target_h\":150,\"density\":2,\"path\":\"compass-financial-debossed-business-cards-thumb@2x.jpg\",\"size\":8415,\"mime\":\"\",\"assetID\":\"160\"}}},\"alt\":null},{\"image\":{\"assetID\":\"163\",\"title\":\"Compass financial corporate stationery\",\"_default\":\"\\/perch\\/resources\\/compass-financial-corporate-stationery.jpg\",\"bucket\":\"default\",\"path\":\"compass-financial-corporate-stationery.jpg\",\"size\":467502,\"w\":1920,\"h\":1281,\"mime\":\"image\\/jpeg\",\"sizes\":{\"thumb\":{\"w\":\"150\",\"h\":\"100\",\"target_w\":150,\"target_h\":150,\"density\":2,\"path\":\"compass-financial-corporate-stationery-thumb@2x.jpg\",\"size\":12356,\"mime\":\"\",\"assetID\":\"164\"}}},\"alt\":null}],\"deliverables\":[{\"deliverables\":\"Web Design\"},{\"deliverables\":\"Brand Identity\"},{\"deliverables\":\"Corporate Stationery\"}],\"slug\":\"compass-financial\",\"servicesprovidedlist\":[{\"servicesprovidedicon\":\"web\"},{\"servicesprovidedicon\":\"design\"}],\"work\":[\"4\"]}', itemSearch=' Compass Financial Alex Devine & Mike McCoole Ruthin-based financial planners Compass Financial offers its clients a professional and highly personalised service. We were asked to bring their brand identity into line, supply specially-printed hot-foil, debossed luxury cards and formulate a new secure website.\nResponsive Web Design\nOur web team were tasked to create a brand new fully responsive website, after our initial brief we began working on the design both our graphic designers and web developers used the already implemented brand palette to create a simple yet informative website. Web Design Brand Identity Corporate Stationery compass financial web design Web ' WHERE itemRowID=1396
SELECT * FROM perch2_content_items WHERE regionID=92 AND itemRev=270 ORDER BY itemOrder ASC
Using template: /templates/content/portfolio_item.html
SELECT * FROM perch2_categories ORDER BY catTreePosition ASC
UPDATE perch2_content_regions SET regionHTML='<div class=\"uk-grid uk-flex uk-flex-middle uk-margin-bottom uk-margin-top\" data-uk-grid-margin>\n <div class=\"uk-width-medium-1-1 uk-flex-middle\">\n <div class=\"uk-slidenav-position\" data-uk-slideshow=\"{autoplay:true,autoplayInterval:4000,autoplay:true}\">\n \n <ul class=\"uk-slideshow uk-grid uk-grid-width-1-3\">\n \n \n <li class=\"\">\n <img src=\"/perch/resources/portfolio-cig-gafr-conwy-goat-meat-branding04.jpg\" alt=\"\" />\n </li>\n \n \n <li class=\"\">\n <img src=\"/perch/resources/portfolio-cig-gafr-conwy-goat-meat-branding01.jpg\" alt=\"\" />\n </li>\n \n \n <li class=\"\">\n <img src=\"/perch/resources/portfolio-cig-gafr-conwy-goat-meat-branding05.jpg\" alt=\"\" />\n </li>\n \n \n <li class=\"\">\n <img src=\"/perch/resources/portfolio-cig-gafr-conwy-goat-meat-branding02.jpg\" alt=\"\" />\n </li>\n \n \n <li class=\"\">\n <img src=\"/perch/resources/portfolio-cig-gafr-conwy-goat-meat-branding06-5.jpg\" alt=\"\" />\n </li>\n \n </ul>\n \n \n <a href=\"\" class=\"uk-slidenav uk-slidenav-contrast uk-slidenav-previous\" data-uk-slideshow-item=\"previous\"></a>\n <a href=\"\" class=\"uk-slidenav uk-slidenav-contrast uk-slidenav-next\" data-uk-slideshow-item=\"next\"></a>\n <ul class=\"uk-dotnav uk-dotnav-contrast uk-flex-center uk-margin-top\">\n \n <li data-uk-slideshow-item=\"0\">\n <a href=\"\"></a>\n </li>\n \n <li data-uk-slideshow-item=\"1\">\n <a href=\"\"></a>\n </li>\n \n <li data-uk-slideshow-item=\"2\">\n <a href=\"\"></a>\n </li>\n \n <li data-uk-slideshow-item=\"3\">\n <a href=\"\"></a>\n </li>\n \n <li data-uk-slideshow-item=\"4\">\n <a href=\"\"></a>\n </li>\n \n</ul>\n </div>\n </div>\n </div>\n <div class=\"uk-width-1-\">\n <div class=\"uk-grid uk-grid-divider\">\n <div class=\"uk-width-medium-2-3\">\n <h1 class=\"uk-margin-remove\">Conwy Goat Meat</h1>\n <p><p>Based high above the Conwy Valley, Conwy Goat Meat (Cig Gafr Conwy) specialize in a healthy alternative to traditional meat - delicious, organic, free-range goat meat.</p>\n<p>A new company Conwy Goat Meat have received backing from <a href=\"https://www.menterabusnes.co.uk/en/cywain\" title=\"developed to support the development of new products and markets for agricultural and fishery areas\">Cywain</a> (the food added value project Cywain from Menter a Busnes, developed to support the development of new products and markets for agricultural and fishery areas).</p></p>\n </div>\n <div class=\"uk-width-medium-1-3\">\n <ul class=\"uk-list uk-list-line uk-list-space\">\n <li><div class=\"uk-float-left\">Client</div><div class=\"uk-float-right\">Conwy Goat Meat</div></li>\n <li><div class=\"uk-float-left\">Project by</div><div class=\"uk-float-right\">Mike McCoole</div></li>\n <li>\n <div class=\"uk-grid\">\n <div class=\"uk-width-1-2\">\n <div class=\"uk-float-left\">Deliverables</div>\n </div>\n <div class=\"uk-width-1-2\">\n \n <div class=\"uk-align-right\">\n Brand Identity\n </div>\n \n </div>\n </div></li>\n <li><div class=\"uk-float-left\">Share</div>\n <div class=\"uk-float-right\">\n <div class=\"fb-share-button\" data-href=\"/detail/conwy-goat-meat\" data-layout=\"button\"></div>\n <a class=\"twitter-share-button\" href=\"https://twitter.com/share\">Tweet</a>\n <div class=\"g-plus\" data-action=\"share\" data-annotation=\"none\" data-href=\"/detail/conwy-goat-meat\"></div>\n <a href=\"//www.pinterest.com/pin/create/button/\" data-pin-do=\"buttonBookmark\" data-pin-color=\"red\"><img src=\"//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_red_20.png\" /></a>\n </div></li>\n </ul>\n \n \n <h3>Services Provided</h3>\n <ul class=\"uk-grid uk-grid-width-1-5 uk-grid-small\" data-uk-grid-margin=\"\">\n \n <li class=\"\">\n <img src=\"../../images/portfolio/service-icons/design.png\" width=\"51\" height=\"44\" alt=\"service icon\" />\n </li>\n \n </ul>\n </div>\n </div>\n </div>\n\n \n \n <h3>TEST cat links</h3>\n <ul class=\"tags\">\n \n <li><a href=\"/category/work/brand/\">brand</a></li>\n \n </ul>\n \n \n \n <h3>Portfolio Filter (Testing Filter)</h3>\n <ul id=\"filter\" class=\"uk-subnav uk-subnav-pill\">\n \n <li class=\"uk-active\" data-uk-filter=\"\"><a href=\"#\">All</a></li>\n <li data-uk-filter=\"filter-b\"><a href=\"#\">Filter B</a></li>\n <li data-uk-filter=\"filter-b\"><a href=\"#\">Filter B</a></li>\n \n\n\n<div class=\"uk-grid-width-small-1-2 uk-grid-width-medium-1-3 uk-grid-width-large-1-4\" data-uk-grid=\"{gutter: 20, controls: \'#filter\'}\">\n <div data-uk-filter=\"filter-a\"><div class=\"uk-panel-box\">A 1</div></div>\n <div data-uk-filter=\"filter-b\"><div class=\"uk-panel-box\">B 2</div></div>\n <div data-uk-filter=\"filter-a\"><div class=\"uk-panel-box\">A 3</div></div>\n <div data-uk-filter=\"filter-b\"><div class=\"uk-panel-box\">B 4</div></div>\n <div data-uk-filter=\"filter-b\"><div class=\"uk-panel-box\">B 5</div></div>\n <div data-uk-filter=\"filter-a\"><div class=\"uk-panel-box\">A 6</div></div>\n <div data-uk-filter=\"filter-b\"><div class=\"uk-panel-box\">B 7</div></div>\n <div data-uk-filter=\"filter-a\"><div class=\"uk-panel-box\">A 8</div></div>\n </div>\n </div>\n<div class=\"uk-grid uk-flex uk-flex-middle uk-margin-bottom uk-margin-top\" data-uk-grid-margin>\n <div class=\"uk-width-medium-1-1 uk-flex-middle\">\n <div class=\"uk-slidenav-position\" data-uk-slideshow=\"{autoplay:true,autoplayInterval:4000,autoplay:true}\">\n \n \n <li class=\"\">\n <img src=\"/perch/resources/compass-financial-responsive-web-design.jpg\" alt=\"\" />\n </li>\n \n \n <li class=\"\">\n <img src=\"/perch/resources/compass-financial-brand-identity.jpg\" alt=\"\" />\n </li>\n \n \n <li class=\"\">\n <img src=\"/perch/resources/imacmockup4.jpg\" alt=\"\" />\n </li>\n \n \n <li class=\"\">\n <img src=\"/perch/resources/compass-financial-debossed-business-cards.jpg\" alt=\"\" />\n </li>\n \n \n <li class=\"\">\n <img src=\"/perch/resources/compass-financial-corporate-stationery.jpg\" alt=\"\" />\n </li>\n \n </ul>\n \n \n <a href=\"\" class=\"uk-slidenav uk-slidenav-contrast uk-slidenav-previous\" data-uk-slideshow-item=\"previous\"></a>\n <a href=\"\" class=\"uk-slidenav uk-slidenav-contrast uk-slidenav-next\" data-uk-slideshow-item=\"next\"></a>\n <ul class=\"uk-dotnav uk-dotnav-contrast uk-flex-center uk-margin-top\">\n \n <li data-uk-slideshow-item=\"0\">\n <a href=\"\"></a>\n </li>\n \n <li data-uk-slideshow-item=\"1\">\n <a href=\"\"></a>\n </li>\n \n <li data-uk-slideshow-item=\"2\">\n <a href=\"\"></a>\n </li>\n \n <li data-uk-slideshow-item=\"3\">\n <a href=\"\"></a>\n </li>\n \n <li data-uk-slideshow-item=\"4\">\n <a href=\"\"></a>\n </li>\n \n</ul>\n </div>\n </div>\n </div>\n <div class=\"uk-width-1-\">\n <div class=\"uk-grid uk-grid-divider\">\n <div class=\"uk-width-medium-2-3\">\n <h1 class=\"uk-margin-remove\">Compass Financial</h1>\n <p><p>Ruthin-based financial planners Compass Financial offers its clients a professional and highly personalised service. We were asked to bring their brand identity into line, supply specially-printed hot-foil, debossed luxury cards and formulate a new secure website.</p>\n<h2>Responsive Web Design</h2>\n<p>Our web team were tasked to create a brand new fully responsive website, after our initial brief we began working on the design both our graphic designers and web developers used the already implemented brand palette to create a simple yet informative website.</p></p>\n </div>\n <div class=\"uk-width-medium-1-3\">\n <ul class=\"uk-list uk-list-line uk-list-space\">\n <li><div class=\"uk-float-left\">Client</div><div class=\"uk-float-right\">Compass Financial</div></li>\n <li><div class=\"uk-float-left\">Project by</div><div class=\"uk-float-right\">Alex Devine & Mike McCoole</div></li>\n <li>\n <div class=\"uk-grid\">\n <div class=\"uk-width-1-2\">\n <div class=\"uk-float-left\">Deliverables</div>\n </div>\n <div class=\"uk-width-1-2\">\n \n <div class=\"uk-align-right\">\n Web Design\n </div>\n \n <div class=\"uk-align-right\">\n Brand Identity\n </div>\n \n <div class=\"uk-align-right\">\n Corporate Stationery\n </div>\n \n </div>\n </div></li>\n <li><div class=\"uk-float-left\">Share</div>\n <div class=\"uk-float-right\">\n <div class=\"fb-share-button\" data-href=\"/detail/compass-financial\" data-layout=\"button\"></div>\n <a class=\"twitter-share-button\" href=\"https://twitter.com/share\">Tweet</a>\n <div class=\"g-plus\" data-action=\"share\" data-annotation=\"none\" data-href=\"/detail/compass-financial\"></div>\n <a href=\"//www.pinterest.com/pin/create/button/\" data-pin-do=\"buttonBookmark\" data-pin-color=\"red\"><img src=\"//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_red_20.png\" /></a>\n </div></li>\n </ul>\n \n \n <h3>Services Provided</h3>\n <ul class=\"uk-grid uk-grid-width-1-5 uk-grid-small\" data-uk-grid-margin=\"\">\n \n <li class=\"\">\n <img src=\"../../images/portfolio/service-icons/web.png\" width=\"51\" height=\"44\" alt=\"service icon\" />\n </li>\n \n <li class=\"\">\n <img src=\"../../images/portfolio/service-icons/design.png\" width=\"51\" height=\"44\" alt=\"service icon\" />\n </li>\n \n </ul>\n </div>\n </div>\n </div>\n\n \n \n <h3>TEST cat links</h3>\n <ul class=\"tags\">\n \n <li><a href=\"/category/work/web/\">Web</a></li>\n \n </ul>\n \n \n \n <li class=\"uk-active\" data-uk-filter=\"\"><a href=\"#\">All</a></li>\n <li data-uk-filter=\"filter-b\"><a href=\"#\">Filter B</a></li>\n <li data-uk-filter=\"filter-b\"><a href=\"#\">Filter B</a></li>\n \n </ul>\n \n\n\n<div class=\"uk-grid-width-small-1-2 uk-grid-width-medium-1-3 uk-grid-width-large-1-4\" data-uk-grid=\"{gutter: 20, controls: \'#filter\'}\">\n <div data-uk-filter=\"filter-a\"><div class=\"uk-panel-box\">A 1</div></div>\n <div data-uk-filter=\"filter-b\"><div class=\"uk-panel-box\">B 2</div></div>\n <div data-uk-filter=\"filter-a\"><div class=\"uk-panel-box\">A 3</div></div>\n <div data-uk-filter=\"filter-b\"><div class=\"uk-panel-box\">B 4</div></div>\n <div data-uk-filter=\"filter-b\"><div class=\"uk-panel-box\">B 5</div></div>\n <div data-uk-filter=\"filter-a\"><div class=\"uk-panel-box\">A 6</div></div>\n <div data-uk-filter=\"filter-b\"><div class=\"uk-panel-box\">B 7</div></div>\n <div data-uk-filter=\"filter-a\"><div class=\"uk-panel-box\">A 8</div></div>\n </div>\n </div>\n', regionRev=270, regionLatestRev=270 WHERE regionID=92
Setting alert: Content successfully updated (success)
SELECT * FROM perch2_resources WHERE resourceApp='content' AND resourceInLibrary=0 AND resourceCreated<'2015-03-04 17:28:21' AND resourceID NOT IN (SELECT resourceID FROM perch2_resource_log)
SELECT MIN(itemRev) FROM perch2_content_items WHERE regionID=92
DELETE FROM perch2_content_index WHERE regionID=92 AND itemRev<263
SELECT * FROM perch2_content_items WHERE regionID=92 AND itemRev=270 ORDER BY itemOrder ASC
DELETE FROM perch2_content_index WHERE regionID=92 AND itemRev=270
Using template: /templates/content/portfolio_item.html
SELECT * FROM perch2_categories WHERE catID=6 LIMIT 1
INSERT INTO perch2_content_index (itemID, regionID, pageID, itemRev, indexKey, indexValue) VALUES (70,92,13,270,'title','Conwy Goat Meat'),(70,92,13,270,'completeby','Mike McCoole'),(70,92,13,270,'desc','Based high above the Conwy Valley, Conwy Goat Meat (Cig Gafr Conwy) specialize in a healthy alternative to traditional meat - delicious, organic, free-range goat meat.\nA new company Conwy Goat Meat have received backing from Cywain (the food added value p'),(70,92,13,270,'listimage','/perch/resources/portfolio-cig-gafr-conwy-goat-meat-branding01.jpg'),(70,92,13,270,'gallery.image','/perch/resources/portfolio-cig-gafr-conwy-goat-meat-branding04.jpg'),(70,92,13,270,'gallery.image','/perch/resources/portfolio-cig-gafr-conwy-goat-meat-branding01.jpg'),(70,92,13,270,'gallery.image','/perch/resources/portfolio-cig-gafr-conwy-goat-meat-branding05.jpg'),(70,92,13,270,'gallery.image','/perch/resources/portfolio-cig-gafr-conwy-goat-meat-branding02.jpg'),(70,92,13,270,'gallery.image','/perch/resources/portfolio-cig-gafr-conwy-goat-meat-branding06-5.jpg'),(70,92,13,270,'gallery.alt',''),(70,92,13,270,'gallery.alt',''),(70,92,13,270,'gallery.alt',''),(70,92,13,270,'gallery.alt',''),(70,92,13,270,'gallery.alt',''),(70,92,13,270,'deliverables.deliverables','Brand Identity'),(70,92,13,270,'slug','conwy-goat-meat'),(70,92,13,270,'servicesprovidedlist.servicesprovidedicon','design'),(70,92,13,270,'_category','work/brand/'),(70,92,13,270,'_id',70),(70,92,13,270,'_order','1000')
SELECT * FROM perch2_categories WHERE catID=4 LIMIT 1
INSERT INTO perch2_content_index (itemID, regionID, pageID, itemRev, indexKey, indexValue) VALUES (71,92,13,270,'title','Compass Financial'),(71,92,13,270,'completeby','Alex Devine & Mike McCoole'),(71,92,13,270,'desc','Ruthin-based financial planners Compass Financial offers its clients a professional and highly personalised service. We were asked to bring their brand identity into line, supply specially-printed hot-foil, debossed luxury cards and formulate a new secure'),(71,92,13,270,'listimage','/perch/resources/compass-financial-responsive-web-design.jpg'),(71,92,13,270,'gallery.image','/perch/resources/compass-financial-responsive-web-design.jpg'),(71,92,13,270,'gallery.image','/perch/resources/compass-financial-brand-identity.jpg'),(71,92,13,270,'gallery.image','/perch/resources/imacmockup4.jpg'),(71,92,13,270,'gallery.image','/perch/resources/compass-financial-debossed-business-cards.jpg'),(71,92,13,270,'gallery.image','/perch/resources/compass-financial-corporate-stationery.jpg'),(71,92,13,270,'gallery.alt',''),(71,92,13,270,'gallery.alt',''),(71,92,13,270,'gallery.alt',''),(71,92,13,270,'gallery.alt',''),(71,92,13,270,'gallery.alt',''),(71,92,13,270,'deliverables.deliverables','Web Design'),(71,92,13,270,'deliverables.deliverables','Brand Identity'),(71,92,13,270,'deliverables.deliverables','Corporate Stationery'),(71,92,13,270,'slug','compass-financial'),(71,92,13,270,'servicesprovidedlist.servicesprovidedicon','web'),(71,92,13,270,'servicesprovidedlist.servicesprovidedicon','design'),(71,92,13,270,'_category','work/web/'),(71,92,13,270,'_id',71),(71,92,13,270,'_order','1001')
OPTIMIZE TABLE perch2_content_index
UPDATE perch2_pages SET pageModified='2015-03-05 17:28:21' WHERE pageID=13
SELECT * FROM perch2_content_items WHERE regionID=92 AND itemRev=270 AND itemID=71 ORDER BY itemOrder ASC
SELECT * FROM perch2_categories c, perch2_category_sets s WHERE c.setID=s.setID AND s.setSlug='work' ORDER BY catTreePosition ASC
Queries: 68
Memory: 4.7206

Route: domainame/category/work/web/

Drew McLellan

Drew McLellan 2638 points
Perch Support

That looks like debug from the control panel.

SELECT * FROM perch2_pages WHERE pagePath='/category.php' LIMIT 1
SELECT regionKey, regionHTML FROM perch2_content_regions WHERE regionPage='/category.php' OR regionPage='*' ORDER BY regionPage DESC
Using template: /templates/pages/attributes/page_settings.html
Using template: /templates/pages/attributes/page_settings.html
Using template: /templates/pages/attributes/page_settings.html
Using template: /templates/pages/attributes/page_settings.html
Using template: /templates/pages/attributes/page_settings.html
SELECT * FROM perch2_pages WHERE pageNew=0 AND pageHidden=0 ORDER BY pageTreePosition ASC
SELECT pageTreePosition FROM perch2_pages WHERE pagePath='/category.php' LIMIT 1
SELECT pageID FROM perch2_pages WHERE pageTreePosition IN ('000-013', '000')
Using template: /templates/navigation/main-nav.html
SELECT setID FROM perch2_category_sets WHERE setSlug='' LIMIT 1
SELECT main.* FROM perch2_categories main WHERE 1=1 ORDER BY catTreePosition ASC
Using template: /templates/categories/category.html
SELECT * FROM perch2_pages WHERE pageNew=0 AND pageHidden=0 ORDER BY pageTreePosition ASC
SELECT pageTreePosition FROM perch2_pages WHERE pagePath='/category.php' LIMIT 1
SELECT pageID FROM perch2_pages WHERE pageTreePosition IN ('000-013', '000')
Using template: /templates/navigation/offcanvas.html

This is from /category/work/web/

Drew McLellan

Drew McLellan 2638 points
Perch Support

I can't see any filtering of categories there at all, and no evidence of any routes being used. Are you on Runway?

No sir, using standard Perch, your docs are very limited on categories and after following the videos I am struggling to show simple items from a cat.

Drew,

After looking at the debug in the category section in the admin it is only showing it is using one template from the set and not the category

Using template: /templates/categories/set.html

But not the category.html

On the frontend it is showing I'm using template: /templates/categories/category.html however I am calling category_single.html

Morning,

Any updates on this matter?

Drew McLellan

Drew McLellan 2638 points
Perch Support

So do you have some rewrite rules in place for this page?

Hi Drew,

I have the following:

 <IfModule mod_rewrite.c>
  Options +FollowSymLinks
  RewriteEngine On

RewriteRule ^casestudy/([a-z-Z0-9-/]+)$ /casestudy.php?s=$1 [L]
RewriteRule ^category/([a-z-Z0-9-/]+)$ /category.php?s=$1 [L]
  RewriteBase /

# Add trailing slash to url
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/|#(.*))$
  RewriteRule ^(.*)$ $1/ [R=301,L]

# Remove .php-extension from url
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME}\.php -f
  RewriteRule ^([^\.]+)/$ $1.php

# End of Apache Rewrite Rules
 </IfModule>

 ErrorDocument 404 /404.php