Jump to content
Sign in to follow this  
steveandrews

Custom Page Template

Recommended Posts

steveandrews

I'm trying to create a custom page template and have done the following: I created a new file under platformbase and called it page.test.php I then added the following to it:

<?php
	 if(VPRO) {
	 /*
	 Template Name: Test Page
	 */

I can see the template when creating a new page, but cannot find it under PlatformPro -> Template Setup. I read on this forum that I need to add it to config.templates.php but my worry is that if I do this it will be overwritten when I next update Pagelines?

Share this post


Link to post
Share on other sites
Andrew

Looks like you're missing the `pagelines_setup_template();` function call..

Share this post


Link to post
Share on other sites
steveandrews

Thanks Andrew. I'm afraid I don't know PHP very well - can you help me out where I place the function call with the script I already have?

Share this post


Link to post
Share on other sites
timlinson

Hey Steve, basically the 2nd half of the file is missing. You need to add the line that Andrew gave you, plus a right curly brace `}` to close the if-statement. To register it in your template dropdown, you don't need to do that in your core theme. It's recommended to add something like `pagelines_add_page('test', 'My Test Page!');` to your base's functions.php file. more details here: http://www.pagelines.com/docs/custom-sections

Share this post


Link to post
Share on other sites
steveandrews

Thanks Tim - I discovered that page about 10 mins after posting - it has exactly the info I was looking for. Thanks for all the responses folks.

Share this post


Link to post
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

Sign in to follow this  

×