Page Types / Single Pages / Templates
Permalink
Hi there,
I have been building a new site and it seems to be going well (touch wood!). However I am getting a little confused with page types. Its a basic site with only two page layouts. Most use the same template bar one page. I have created the view.php and default.php files and have now created a gallery.php for my page thats different. Im just a little confused as to if I am going about this the right way...is the view.php what is used automatically when I add a new page? Just want to make sure I'm doing things the right way. I have read the literature but its just getting me more confused. :-/
I have been building a new site and it seems to be going well (touch wood!). However I am getting a little confused with page types. Its a basic site with only two page layouts. Most use the same template bar one page. I have created the view.php and default.php files and have now created a gallery.php for my page thats different. Im just a little confused as to if I am going about this the right way...is the view.php what is used automatically when I add a new page? Just want to make sure I'm doing things the right way. I have read the literature but its just getting me more confused. :-/
Because concrete5 themes are allowed to define their own page types, it's entirely possible that the next theme you activate might not include all the page types your last theme did. When this happens, concrete5 renders default.php as a fallback.
view.php also has the distinction of containing its own special snippet of php, not found in regular page types. Between the usual page type header / footer includes and whatever HTML is needed to produce a basic page on your site, view.php includes this:
print $innerContent;
This line prints out the special single page content.