Page 1 of 1

Static Page Improvements

Posted: Mon Aug 25, 2008 2:46 pm
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

Posted: Mon Aug 25, 2008 5:28 pm
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/ ?

Posted: Mon Aug 25, 2008 6:21 pm
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