PubKit Create Post and Delete forms
The PubKit E1.0 snippet call for the blog, using the default Post class, looks like this (you'll need to put your own values in for &folder, &postid etc.):
[!PubKit? &folder=`932` &postid=`932` &template=`pkBlogPost` &tags=`pkBlogTags` &reqTags=`pkBlogTags` &rtcontent=`pkRichContent` &formtpl=`pk.blog.input.tpl` &delimiter=`,` &debug=`0` !]
(I think &delimiter is obsolete, no time to check right now)
The HTML chunk for adding a new pkBlog post or editing an existing one is listed below. This can be a chunk specified by its name, or a file specified using &formtpl=`@FILE:blog`, where the file is stored in the pubKit/chunks folder with a name in the format chunk.blog.html. This form uses CSS styles in the pkForms.css file that is part of the download package.
Note that the technique for the rich-text element has changed with PubKit E1.0. The TV is now made into a placeholder such as [+pkRichText+], instead of being inserted as a TV [*tvpkRichText*]. The TV no longer needs to have the [+newsBody+] placeholder in its definition.
If you click on Delete in the Manage Posts or Preview screens, the output of the PubKit snippet will be the template chunk named in the item's class definition as its deletions form. The standard chunk for an item using the Post class, pk.ConfirmDelete.tpl, is listed at the bottom of the page.
blog.input.tpl
<form action="" method="post" id="itemEdit">
<input name="pkForm" type="hidden" value="on" />
<input name="docId" type="hidden" value="[+docId+]" />
<div class="row"> Status: [+itemStatus+] [+previewStatus+] </div>
<div class="row">
<span class="edLabel"><label for="title">Title</label></span>
<span class="edField"><input type="text" class="medium" name="pagetitle" id="title" value="[+pagetitle+]"></input></span>
</div>
<div class="row">
<span class="edLabel"><label for="subhead">Headline</label></span>
<span class="edField"><input type="text" class="wide" name="longtitle" id="subhead" value="[+longtitle+]"></input></span>
</div>
<div class="row">
<span class="edLabel"><label for="displayDate">Date</label></span>
<span class="edField"><input type="text" class="date" id="displayDate" name="displayDate" value="[+displayDate+]"></input></span>
<span class="edLabel edLabelSubs"><label for="displayFrom">Show from</label></span>
<span class="edField"><input type="text" class="date" id="displayFrom" name="displayFrom" value="[+displayFrom+]"></input></span>
<span class="edLabel edLabelSubs"><label for="displayTo">To</label></span>
<span class="edField"><input type="text" class="date" id="displayTo" name="displayTo" value="[+displayTo+]"></input></span>
</div>
<fieldset id="tagList"><legend>Tags</legend>[+pkBlogTags+]</fieldset>
<div class="row">
<span class="edLabel"><label for="introtext">Intro</label></span>
<span class="edField"><textarea class="wide" name="introtext" id="introtext">[+introtext+]</textarea></span>
</div>
<div class="row">
<span class="edLabel"><label for="detail"> </label></span>
<span class="edField" id="detail">[+pkRichContent+]</span>
</div>
<div class="row" style="text-align:right;">
<input type="submit" id="submitButton" name="submit" value="Publish" accesskey="B"/>
<input type="submit" id="previewButton" name="preview" value="Preview" accesskey="V"/>
</div>
</form>
pk.ConfirmDeletion.tpl template chunk
(an alternative chunk can be named in the item's class definition, e.g.
var $delForm = 'pk.delPrompt.tpl';)
<input name="confirmDeletion" type="hidden" value="on" />
<input type="hidden" name="docId" value="[+docId+]">
<input type="hidden" name="returnId" value="[+returnId+]">
<p>Delete item headlined:<br />
[+title+] <br />
[+headline+]?</p>
<input name="delete" type="submit" value="Yes" />
<input name="erase" type="submit" value="No" />
</form>