Page builder issue

Mikhail Grishin asked on November 16, 2021 14:23

I have Landing page type with url pattern /{%DocumentCulture%}/landings/{%NodeAlias.ToLower()%}, "Page Tab" option is checked.

Image Text

I want to be able to add Landing pages in tree and use Page builder for each without making many controllers.

Image Text

Now I have one LandingsController class and one Landings view and get 404 error

Image Text

Recent Answers


Juraj Ondrus answered on November 17, 2021 09:22

How does your page builder enabled controller look like? You will need to create some kind of "shared" controller which will handle your routing options and then you will create the logic which veiw should be returned by the controller.
To begin with, I would check that the page builder is registered correctly and then create a simple controller and view and take it from there and start adding the logic you need.

0 votesVote for this answer Mark as a Correct answer

Mikhail Grishin answered on November 17, 2021 09:54

Juraj, if I remove /{%NodeAlias.ToLower()%} from path, it will be work fine, so controller is working. But I need unique url for each page

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on November 18, 2021 05:45

So, how is your routing configured and what is your controller like? You need to ensure that the unique URLs will match some route and the route will use appropriate controller.

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.