use template file for children page

Post Reply
perfecti
Jr. Bludit
Posts: 2
Joined: Fri Apr 05, 2019 12:00 am

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?


and why static page can't have children?)

Sorry for my bad english :)
User avatar
Edi
Site Admin
Posts: 1491
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

Fri Apr 05, 2019 1:00 am

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.
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
perfecti
Jr. Bludit
Posts: 2
Joined: Fri Apr 05, 2019 12:00 am

Fri Apr 05, 2019 1:32 am

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
User avatar
Edi
Site Admin
Posts: 1491
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

Fri Apr 05, 2019 12:34 pm

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".
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
Post Reply