Static Confusion

Creating and modifying plugins.
Post Reply
gregfuller
Regular
Posts: 13
Joined: Tue Oct 09, 2007 9:33 am

Static Confusion

Post by gregfuller »

Hi,

I read about the new features of static pages, and they sound very promising for creating custom content types, but I'm still confused about how to use them.

I'm using the bulletproof template, so I copied the backend_templates directory and the default_staticpage_backend.tpl file to the bulletproof directory. I edited the file and put in a line of text "Greg's modified default" after the <br> on the first line just to make sure I'm hitting the template in the bulletproof subdirectory and not the template back in the plugin directory.

The I go to static pages on the backend, choose "Simple Template", "New Entry", and voila, the form says "Greg's modified default" just as I expected.

Then I make a copy of default_staticpage_backend.tpl in bulletproof/backend_templates/ and name it "wish_list.tpl". I change the text from "Greg's modified default" to "Wishlist form". I plan to modify the fields in the wish_list template later, but for now I just want to make sure I'm invoking the template.

So I go to static pages, choose "wish_list" instead of "Simple Template". I'm on "New Entry" and hit the go button, and I get a totally empty space where I expected the form to be.

I gotta be missing some simple. Can anyone help?

Thanks, Greg
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Static Confusion

Post by garvinhicking »

Hi!

Hm, basically you did everything alright! I tried to reproduce it here, and it works properly. When you created the new file, did you maybe not assign read privileges for the file for serendipity? Maybe the files contains a parse error? Try to simply only write "Wish" into it, no other HTML/Smarty markup?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
gregfuller
Regular
Posts: 13
Joined: Tue Oct 09, 2007 9:33 am

Re: Static Confusion

Post by gregfuller »

Thank for the reply.

I changed the name from wish_list.tpl to wishlist.tpl and it works. It errors on what_ever.tpl but likes whatever.tpl.

I turned on php error reporting, and the message is:

Warning: Smarty error: unable to read resource: "file:/www/sy141/plugins/serendipity_event_staticpage/backend_templates/wishlist.tpl" in /www/sy141/bundled-libs/Smarty/libs/Smarty.class.php on line 1092

Weird, huh?

Thanks, Greg
Post Reply