Static Page Improvements

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Static Page Improvements

Post by garvinhicking »

Hi guys!

I sat down and implemented smarty templating for the static page edit/create screen, to try to make it look less cluttered.

I believe it works quite well, and allows any user to create his own custom "views" of a static page through a smarty template, that is then offered as a template dropdown option.

Screenshot here:

http://img411.imageshack.us/my.php?imag ... 555ke2.png

Updated ZIP package here:

http://garv.in/files/serendipity_event_staticpage.zip

Feedback, please. :)

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/
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

Looks great Garvin! Your new smarty template is /plugins/serendipity_event_staticpage/backend_templates/default_staticpage.tpl.

Might I suggest changing the name to default_admin_staticpage.tpl, or admin_default_staticpage.tpl, to make it a bit more clear that it is the admin staticpage?

Also, if a template included a custom version of this file, would it be located in /templates/mytemplate/admin/ ?
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Good suggestion, I'll try to change that name for clarity. BTW, I'm still on your email you send me, but must sort out a few things first :)
Also, if a template included a custom version of this file, would it be located in /templates/mytemplate/admin/ ?
No, currently it would only be searched in the main directory, so /templates/bulletproof/default_staticpage.tpl.

But only files are shown in the dropdown that exist within the staticpage directory itself. You can put an empty file there and put the real content in the template directory though. Technically it would lead to duplicates, if the plugin search all template directories as well, so it only operates on its own subdir.

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/
Post Reply