Page 1 of 1

use template file for children page

Posted: Fri Apr 05, 2019 12:21 am
by perfecti
I have a static page
profile/

It is necessary that when going to profile/{nickname} used profile.php template, and not notFound() 404. How can I do?


and why static page can't have children?)

Sorry for my bad english :)

Re: use template file for children page

Posted: Fri Apr 05, 2019 1:00 am
by Edi
perfecti wrote: Fri Apr 05, 2019 12:21 am I have a static page
profile/

It is necessary that when going to profile/{nickname} used profile.php template, and not notFound() 404. How can I do?
If you have a page "Profile" the permalink will be yourdomain.com/profile.

What do you mean with profile/{nickname}?
and why static page can't have children?)
Normal pages can have subpages or children, static pages not.

Static pages are used for example if you have a blog, where the posts are standard pages, and additional static pages like "About", "Contact" etc.

If you have a website you can use standard pages as parent and child pages.

Re: use template file for children page

Posted: Fri Apr 05, 2019 1:32 am
by perfecti
Edi wrote: Fri Apr 05, 2019 1:00 am If you have a page "Profile" the permalink will be yourdomain.com/profile.

What do you mean with profile/{nickname}?
how it should look

yourdomain.com/profile.
erorr 404

yourdomain.com/profile/{nickname}
it loads information about the user whose nickname is specified
my script gets the nickname from the url and displays information
Edi wrote: Fri Apr 05, 2019 1:00 am If you have a website you can use standard pages as parent and child pages.
But then, these pages will be displayed on the main page as news, but I don’t need it because I want to use them as static

Re: use template file for children page

Posted: Fri Apr 05, 2019 12:34 pm
by Edi
perfecti wrote: Fri Apr 05, 2019 1:32 am yourdomain.com/profile.
erorr 404
Custom template for the pages
But then, these pages will be displayed on the main page as news, but I don’t need it because I want to use them as static
No, you can set one page as mainpage in the field "Homepage" at "Settings" > "General" > "Advanced".