Jump to content

No option to "View" page


Steve_Stifler
 Share

Recommended Posts

I have created a template called "Blank-Page" which just has a "Title" field as I wanted to put some code in to create a full page video background, which I have created a file for.

I have applied the template to the page "Coming Soon" and there is no option to "View" the page. The other pages allow me to but this one.

Link to comment
Share on other sites

When go to your template (Blank-Page), you should see a yellow bar like this:

NoTemplateFile.jpg.91ff211c2710fe3a134c0a5bc5b613bd.jpg

So, did you follow the hints from the two other variants of this question? Reading the docs, creating a template file named "Blank-Page.php" in your site/templates folder and placed your code there?

Edited by Autofahrn
typo
  • Like 4
Link to comment
Share on other sites

41 minutes ago, Autofahrn said:

Reading the docs, creating a template file named "Blank-Page.php" in your site/templates folder and placed your code there?

Here is a good one which I recommend for @Steve_Stifler to get started: https://www.pwtuts.com/processwire-tutorials/alternate-template-strategy-using-a-single-output-file/

I linked to this one this time because it also explains a simple strategy to get organized right from the beginning. The only thing I would do differently is that using relative paths in PHP can be cumbersome for beginners, so for example instead of this:

include("./views/{$page->template->name}" . ".php");

I would use:

include $config->paths->templates . "/views/{$page->template->name}" . ".php";

 

Edited by szabesz
typo in code
  • Like 2
Link to comment
Share on other sites

OK guys, thanks for this. I have just realised I have been a bit lazy in not doing the tutorials first, more just finding something when I hit a road block. I've just had a look through the tutorial list. I've never seen a tutorial so organised and also right from the beginning.

I'm going to learn some stuff so I can give you guys something harder to help me with.

Thanks again Legends.

JA.

  • Like 2
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...