Page 1 of 1

Remove fields from published static pages

Posted: Mon Jun 22, 2009 1:40 pm
by sjbennett
I updated from 1.1.2 to 1.4.1. When I originally set up the static pages for my site, I removed the following fields from the static pages:

serendipity_date
serendipity_Entry_Date serendipity_staticpage
staticpage_author
staticpage_metainfo

Under this updated version (which is very nice, thank you!) I cannot seem to figure out hot to removed this information. I removed these fields from the plugin_staticpage.tpl, but that didn't remove the fields from my live site.

What file do I edit to remove this from the static pages?

Many thanks!
Susan

Re: Remove fields from published static pages

Posted: Mon Jun 22, 2009 1:45 pm
by yellowled
sjbennett wrote:Under this updated version (which is very nice, thank you!) I cannot seem to figure out hot to removed this information. I removed these fields from the plugin_staticpage.tpl, but that didn't remove the fields from my live site.
Wild guess: You removed those fields from /plugins/serendipity_event_staticpage/plugin_staticpage.tpl, right? Plus, you're probably using the default theme, which is now Bulletproof. Bulletproof has it's own plugin_staticpage.tpl in /templates/bulletproof/. That's the one you want to edit now since it supersedes the plugin's .tpl file (as long as you use this or any template which brings it's own plugin_staticpage.tpl).

Two things to be aware of:

1. Any future s9y update will overwrite your changes again. Make sure you keep backups of any file you edited.

2. The static pages plugin actually uses more than one .tpl file, and BP also has more than one alternative file for those. Unless you actually use the different types of static pages, this shouldn't bother you, but if you do use i.e. a static page with related category, you'll probably want to edit that particular .tpl files as well.

YL

Re: Remove fields from published static pages

Posted: Mon Jun 22, 2009 2:48 pm
by judebert
To keep his changes after upgrades, couldn't he just create a user.css and set those options to display:none?

Re: Remove fields from published static pages

Posted: Mon Jun 22, 2009 6:37 pm
by yellowled
judebert wrote:To keep his changes after upgrades, couldn't he just create a user.css and set those options to display:none?
I'm assuming Susan would object slightly to being called "he" :wink:, but other than that: Basically, yes. I would, however, recommend a different technique which produces the same result, but is reported to be more friendly with screenreaders:

Code: Select all

.serendipity_staticpage .serendipity_date,
.serendipity_staticpage .serendipity_EntryDate,
.staticpage_author,
.staticpage_metainfo {
    position: absolute;
    left: -9999em;
}
YL

Re: Remove fields from published static pages

Posted: Tue Jun 23, 2009 2:54 pm
by hyejohn
1. Any future s9y update will overwrite your changes again. Make sure you keep backups of any file you edited.
Would it be a good idea to make a copy of the whole BP theme and edit the copy to avoid the overwrite?

Rename the copied folder to BPe (for edit) and edit the info.txt to reflect the change?

Re: Remove fields from published static pages

Posted: Tue Jun 23, 2009 5:21 pm
by yellowled
hyejohn wrote:Rename the copied folder to BPe (for edit) and edit the info.txt to reflect the change?
You could do that, and while it would save you the hassle of having to "backport" your changes after an update, you would also miss out on any changes made to the original BP.

Kinda like "pick your poison", I know :)

YL