From 5bec0ed25caeeacaaf57523adb5a9b3681bc5046 Mon Sep 17 00:00:00 2001 From: Zac Spitzer Date: Wed, 26 Jun 2024 22:15:12 +0200 Subject: [PATCH] Update DocTree.cfc --- api/data/DocTree.cfc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/api/data/DocTree.cfc b/api/data/DocTree.cfc index 918178501..3ca6b4dec 100644 --- a/api/data/DocTree.cfc +++ b/api/data/DocTree.cfc @@ -321,19 +321,24 @@ component accessors=true { var isPage = arguments.page.isPage(); // workaround for page types not being parsed out correctly in PageReader.readPageFile if ( !IsNull( parent ) ) { - if (isPage) + if ( isPage ) parent.addChild( arguments.page ); // don't add page subelements, i.e _attributes etc arguments.page.setParent( parent ); ancestors = parent.getAncestors(); - if (ancestors.len() eq 0 or pageType eq "_method") // avoid duplicates, hack for methods + if ( ancestors.len() eq 0 or pageType eq "_method" ) // avoid duplicates, hack for methods ancestors.append( parent.getId() ); } else { variables.tree.append( arguments.page ); } - if (not isPage) + if ( !isPage ){ + if ( page.getPath() comtains "/recipes" ){ + request.logger(text="skipping coz /recipes" ); + return; + } throw "not a page [#page.path#]"; // only add main pages + } if ( !StructKeyExists( variables.pageTypeMap, pageType ) ) variables.pageTypeMap[ pageType ] = 0;