#1 January 14, 2019 9:20am

daansk44
Member
From: Amersfoort, The Netherlands
Registered: September 12, 2016
Posts: 42

Adding the route to page

Is it possible to add a custom route using the createPage command?

 $this->newpage->createPage([
                    "parent" => 1,
                    "nav_title" => $xmlitem->ItemDesc . " | " . $xmlitem->SimpleColor,
                    "in_nav" => "on",
                    "template" => "Products",
                    "new_window" => "new",
                    "entry" => "new",
                    "max_age" => 0,
                    "route" => 'articleblablabla',

Offline

#2 January 14, 2019 9:24am

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 978

Re: Adding the route to page

Yes, if you pass in "route" it will override the auto generated route. If the route is already used, it will add a number to the end.

Offline

#3 January 14, 2019 12:15pm

daansk44
Member
From: Amersfoort, The Netherlands
Registered: September 12, 2016
Posts: 42

Re: Adding the route to page

Is it possible to add slashes to the route? without using a parent (or routed template)

`productcat/cars/model/ford`

Offline

#4 January 14, 2019 12:32pm

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 978

Re: Adding the route to page

No, slashes indicate to BigTree's router that it's a child of another page so they aren't allowed in an individual route.

Offline

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.