This works fine if there is just one level of subpages in the blog folder, but it doesnât with more sublevels. Is there a way to employ the "Mighty mighty URI-Objects (I canât find this article anymore on the kirby site) to do this?
I am searching for an expression that would say: âblog/â. page URI minus the first folderâŚ
Thanks for the quick reaction. Changing from any to all didnât really change anything on my end. I thought it has more to do with this line:
if(!$page) $page = page(âblog/â . $uid);
because it only constructs a url with âblogâ and the next subfolder uid, while all the folders in between the current UID and âblogâ get ignoredâŚ
thanks, @texnixe. This doesnât work either, and now i am starting to loose track on what it means.
but what i think shouldnât work is this: âblog/â.$uri should create a url like this:
âblog/blog/currentpageâ because the $uri object already contains the blog part, right? i was just wondering if there is a way to construct a path with âblogâ.$uri-without-the-first-level.
But i am not sure, since i canât really read and understand even the original blog function⌠I can only assume that the line
if(!$page) $page = page(âblog/â . $uid);
basically lays out the case of a subpage of âblogâ.
That doesnât make sense, you mix both $uid and $uri now (see my comments above), you have to stick with the variable name you pass to the anonymous function, no matter what you call it.