Custom Static Page Template

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Maccsta
Regular
Posts: 77
Joined: Mon Feb 19, 2007 7:07 am
Location: Leeds, England

Custom Static Page Template

Post by Maccsta » Sun Jan 24, 2010 1:12 am

I want to remove the date and the author from the bottom of my static pages.
What would the best way to do this?

I was going to create a new template by altering the default one and uploading it somewhere else. Then use the ‘Page types’ feature within the plugin to select my custom template.

Where is the best place to store this custom template and avoid deletion when the plugin updates?

Thanks in advance :)
Check out this blog today!
Buy Eye Secrets strips.
Best devices reviewed at http://www.penisstretchers.org/.
Order Capsiplex slimming pills today.
Buy Meratol diet pills online.

stm999999999
Regular
Posts: 1517
Joined: Wed Mar 08, 2006 12:25 am
Location: Berlin, Germany
Contact:

Re: Custom Static Page Template

Post by stm999999999 » Sun Jan 24, 2010 3:15 pm

you can put your own staticpage.tpl into your selected template folder.
Ciao, Stephan

Maccsta
Regular
Posts: 77
Joined: Mon Feb 19, 2007 7:07 am
Location: Leeds, England

Re: Custom Static Page Template

Post by Maccsta » Sun Jan 24, 2010 3:41 pm

stm999999999 wrote:you can put your own staticpage.tpl into your selected template folder.


So in the mydomain.com/templates/

or

Making a folder templates in the plugin directory?

mydomain.com/plugins/pluginsserendipity_event_staticpage/templates/

I just don't want it overwriting when the plugin updates!

Thanks!
Check out this blog today!
Buy Eye Secrets strips.
Best devices reviewed at http://www.penisstretchers.org/.
Order Capsiplex slimming pills today.
Buy Meratol diet pills online.

User avatar
yellowled
Regular
Posts: 7083
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: Custom Static Page Template

Post by yellowled » Sun Jan 24, 2010 5:11 pm

Maccsta wrote:So in the mydomain.com/templates/

mydomain.com/templates/your_template/, actually.

You can do this with any plugin's tpl files (if there are any), and as long as your template doesn't provide the tpl file in question, it won't be overwritten since the copied tpl file is not part of the original template.

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

Maccsta
Regular
Posts: 77
Joined: Mon Feb 19, 2007 7:07 am
Location: Leeds, England

Re: Custom Static Page Template

Post by Maccsta » Sun Jan 24, 2010 5:38 pm

yellowled wrote:
Maccsta wrote:So in the mydomain.com/templates/

mydomain.com/templates/your_template/, actually.

You can do this with any plugin's tpl files (if there are any), and as long as your template doesn't provide the tpl file in question, it won't be overwritten since the copied tpl file is not part of the original template.

YL


Thanks!

However It's not working out. I have made the custom template and uploaded it here:

mydomain.com/templates/static_page/custom_static_page.tpl

Gone to the static page interface selected page types ----> new entry

Description: Custom Article
Template Name: /templates/static_page/custom_static_page.tpl
Image path: left blank



Created a new page with Custom Article as the article type.

When I load up the page I get this error:

Warning: Smarty error: unable to read resource:
"file:/mydomain.co.uk/public_html/blog/plugins/serendipity_event_staticpage/custom_static_page.tpl" in /mydomain.co.uk/public_html/blog/bundled-libs/Smarty/libs/Smarty.class.php on line 1093



Any idea what I've done wrong?
Check out this blog today!
Buy Eye Secrets strips.
Best devices reviewed at http://www.penisstretchers.org/.
Order Capsiplex slimming pills today.
Buy Meratol diet pills online.

stm999999999
Regular
Posts: 1517
Joined: Wed Mar 08, 2006 12:25 am
Location: Berlin, Germany
Contact:

Re: Custom Static Page Template

Post by stm999999999 » Sun Jan 24, 2010 7:33 pm

two things:

Template Name: /templates/static_page/custom_static_page.tpl

here you have to write only the name of the tpl, not the path - IIRC the plugin looks first in the actual template folder and then in his plugin folder.

and:

/templates/static_page/custom_static_page.tpl

Your are sure your template (I mean the template for your whole blog!) has the name "static_page"?
Ciao, Stephan

Maccsta
Regular
Posts: 77
Joined: Mon Feb 19, 2007 7:07 am
Location: Leeds, England

Re: Custom Static Page Template

Post by Maccsta » Sun Jan 24, 2010 8:01 pm

Ok I got it working by adding the custom template direct to staticplugin folder.

However I see what you mean I wasn't adding it to the template folder for my whole blog. I was creating a new folder and it expecting it to find it there, that's why I thought the path was needed.

Thanks a ton for the help, works great now. :)
Check out this blog today!
Buy Eye Secrets strips.
Best devices reviewed at http://www.penisstretchers.org/.
Order Capsiplex slimming pills today.
Buy Meratol diet pills online.

Post Reply