Jump to content

Unlimited Subpages


arynet
 Share

Recommended Posts

Hi, today is my first day use prosesswire. Best CMS for my project.

I just want to ask about make new template. What I need is to manual create new .php file right? is there automatic create that file if I created new template?

And it work for me, just copied existing template. And I can create unlimited subpages, it that normal? or it just about permission because I cant do this in default home template.

Thank for good CMS.

Link to comment
Share on other sites

You need to separate things out a bit.

A template can be created with or without an associated file - a Template File is for markup and any logic you need.

Any file you create in the Template folder and that has a php is a candidate for being associated with a template. 

When you create a template (with or without a file) you can set how it is used - can it have children? Can it be used for new pages? Does it have to be associated with a particular parent? And so on.

Assuming you do not touch these settings, that template can then be used for any amount of sub pages.

A page created with a template cannot be displayed unless there is a template file associated with it. But the data from that page is still available - either by using something like a Page Field on another template, or because you call that field in directly in another template file - $pages->get("/home/")->some_field

It is worth going through some of the tutorials to get your head round these relationships - once you do it is all pretty easy.

http://wiki.processwire.com/index.php/Basic_Website_Tutorial

  • Like 5
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...