Routing System

The routing system is responsible for resolving a URL to a web page of specific content.

To add a new route to the system:

route::add($regex, $page_controller, $resolved_params, $options);

An example resolving the URL /en/books/123/book-name to the page controller pages/book.inc.php:

route::add('#^books/([0-9]+)/#', 'pages/book', 'book_id=$1');

Routing Modules

Routing modules are plug-n-play files containing a set of routes that can be dropped into LiteCart. The files are located in /includes/routes/.

See Also

Révisions

Articles récemment édités
Ce site n'utilise aucun cookie ni aucune technologie de suivi tierce. Nous pensons pouvoir faire mieux que les autres et nous nous soucions vraiment de votre vie privée.