Forum
Perch Runway
Hello, I have a question about Perch Runway. I'm building a product catalog site using MVC architecture and each product page is generated from a third party API. I'll also have other pages however, such as category pages, random content pages, a blog, etc. My initial plan was just to layer Perch on top of it using PerchSystem::set_page and that works well enough, but it seems like it won't really be possible to enable users to create new pages (blog posts, some random content page, etc).
Am I right in thinking that Runway is more suited to this as it uses a front-controller? Assuming I'd have to ditch my current MVC framework in favor of Runway's structure?
I think you could probably use both - which framework is it?
Just a basic one that's slightly customized from this: https://github.com/panique/mini
You should be able to include the
runway/start.php
file from your router inapplication.php
whenever you determine that the current request isn't handled by your application.I reckon that should happen at around line 59: https://github.com/panique/mini/blob/master/application/core/application.php#L59
Thanks. That's the correct spot, but the routing seems to be failing and it's just displaying Perch's 404 page:
Sorry, that page could not be found.
Here's the debug message:
SELECT p.pagePath, pr.routePattern, pr.routeRegExp, p.pageTemplate FROM perch2_pages p LEFT JOIN perch2_page_routes pr ON p.pageID=pr.pageID ORDER BY pr.routeOrder ASC
Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'wahlecomm.perch2_page_routes' doesn't exist
Using master page: /templates/pages/errors/404.php
Page arguments:
SELECT regionKey, regionHTML FROM perch2_content_regions WHERE regionPage='/errors/404' OR regionPage='*' ORDER BY regionPage DESC
Time: 0.0878
Memory: 0.8437
Invalid query...maybe the database wasn't properly updated during the upgrade to Runway?
Try running the update:
Thanks, that took care of it.