Updated edit_entry.tmpl Template


Published on July 22, 2005 at 11:58 AM EST
In the Tutorials category.

I’ve updated the edit_entry.tmpl file in the Alternate Template Collection with a new feature: a “Now” button. Clicking the Now button will update the Authored On field to the current date and time! Download the edit_entry.tmpl alternate template or…

authored-on-now.gif

I’ve updated the edit_entry.tmpl file in the Alternate Template Collection with a new feature: a “Now” button. Clicking the Now button will update the Authored On field to the current date and time!

Download the edit_entry.tmpl alternate template or learn more about this and other alternate templates I’ve created.

This article is tagged as: Alternate Templates, Tutorials

Comments

So far, there are 3 comments and Trackbacks on this entry. Add yours!

1

Dan, I used your alternative edit_entry.tmpl file, and it did a very weird thing: whenever I would select one of my previously saved entries for editing, I would get your new environment with all the quick-key buttons… but it would obliterate the main category for that post.

Not the additional categories, just the main. If I selected it again, it would revert right back to “select” upon saving.

I went back to the original version of edit_entry, since I do need to have main categories… but if you can fix this bug, I would love to go back to yours — it’s much better functionality, except for the category-killing bug!

Has anyone else seen this result?

Dafydd

2

I’m guessing it’s somewhere in this division:


?

selected=”selected”>
selected=”selected”>
selected=”selected”>



” selected=”selected”>



3

Well, that didn’t work! Let me try again. This time, I am converting all the angle brackets to left and right parentheses… so please just mentally convert them in your mind!

(div id=”status-field”)
(TMPL_IF NAME=DISP_PREFS_BASIC)
(label for=”status”)(MT_TRANS phrase=”Post Status”)(/label) (a href=”#” onclick=”return openManual(‘entries’, ‘item_post_status’);return false;” class=”help”)?(/a)(br /)
(select name=”status” id=”status” tabindex=”2”)
(option value=”1”(TMPL_IF NAME=”STATUS_DRAFT”) selected=”selected”(/TMPL_IF))(MT_TRANS phrase=”Draft”)(/option)
(option value=”2”(TMPL_IF NAME=”STATUS_PUBLISH”) selected=”selected”(/TMPL_IF))(MT_TRANS phrase=”Publish”)(/option)
(option value=”4”(TMPL_IF NAME=”STATUS_FUTURE”) selected=”selected”(/TMPL_IF))(MT_TRANS phrase=”Future”)(/option)
(/select)
(TMPL_UNLESS NAME=NEW_OBJECT)
(span class=”tip”)(TMPL_VAR NAME=CREATED_ON_FORMATTED ESCAPE=HTML)(/span)
(/TMPL_UNLESS)
(TMPL_ELSE)
(TMPL_IF NAME=DISP_PREFS_SHOW_CATEGORY)
(label for=”category_id”)(MT_TRANS phrase=”Primary Category”)(/label)(br /)
(select name=”category_id” id=”category_id” tabindex=”2” onchange=”doAddCategory(this)”)
(TMPL_LOOP NAME=CATEGORY_LOOP)
(TMPL_IF NAME=CATEGORY_LABEL)
(option value=”(TMPL_VAR NAME=CATEGORY_ID)”(TMPL_IF NAME=”CATEGORY_IS_PRIMARY”) selected=”selected”(/TMPL_IF))(TMPL_VAR NAME=CATEGORY_LABEL_SPACER)(TMPL_VAR NAME=CATEGORY_LABEL)(/option)
(/TMPL_IF)
(/TMPL_LOOP)
(TMPL_IF NAME=CAN_EDIT_CATEGORIES)
(option value=”“)(MT_TRANS phrase=”Add new category…”)(/option)
(/TMPL_IF)
(/select)(br /)
(TMPL_IF NAME=HAVE_MULTIPLE_CATEGORIES)(TMPL_UNLESS NAME=NEW_OBJECT)(a id=”assign-multiple” href=”javascript:editPlacements()”)(MT_TRANS phrase=”Assign Multiple Categories”)(/a)(/TMPL_UNLESS)(/TMPL_IF)
(/TMPL_IF)
(/TMPL_IF)

(/div)

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

 
 
 


TrackBack URL for Updated edit_entry.tmpl Template:
http://www.eatdrinksleepmovabletype.com/cgi-bin/mt/mt-tb.cgi/309