Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hi

I create an app where there is a landing page (index.php in root folder) with a block of informational content about the product/app created via clonable pages and a part with two forms: create account and login. This part should have different routes (passwort forgotten page, create account page, separate login page with errors when wronmg password etc.).

I was not able to bring it to life with the options clonable='1' and routable='1' together. There was never k_is_page=1 activated. I do not understand how to define custom routes besides the pretty_url cloned pages.

Any hint? Is there a primary route with path='' that serves for the clonable pages? How can I combine the cloned pages with custom routes?

Regards,
Olliwalli

Hi,

The documentation on custom routes (https://www.couchcms.com/docs/custom-routes/) states the following -
The second change (adding K_IGNORE_CONTEXT to COUCH::invoke()) serves to instruct Couch to no longer apply the default views to this template. This is an important point - by doing this we are turning off Couch's default behavior of examining the URL used to access this template and then attaching one of the well-known views to it

[*NOTE: strictly speaking, Couch still attaches one view to this template - the 'home-view'. So whatever the URL used to access the template, if we query Couch about the view it'll always report 'home-view'. Thing is, we'll now use the 'routes' module and no longer use Couch's interpretation of the current view so this is not a problem.]

As you can see, it mentions the fact that the views (e.g. page-view, folder-view etc.) no longer apply to templates using custom routes. That is understandable as now you would be responsible for deciding which route represents which view.

Please take a look at the mentioned docs again and also the tutorial - https://www.couchcms.com/docs/advanced- ... outes.html - that should help you in figuring out how to structure your use-case.

Hope this helps.

I wonder why a custom route is a requirement in this project. Can't have several separate regular templates?
3 posts Page 1 of 1
cron