Hi guys,
Sorry to waste your time...
I just finished creating a front-end news publishing page that allows a basic user to publish news items without accessing the manager.
Here’s my snippett call
[!NewsPublisher? &folder=`2` &canpost=`Site Admins` &formtpl=`FormBlog` &makefolder=`1` &rtcontent=`blogContent`!]
As you can see, I have a chunk (FormBlog) used for the form template and a TV (blogContent) used for the editior.
That replaced the original textarea as suggested by the docs.
Here’s the chunk
<form name="NewsPublisher" method="post" action="[~[*id*]~]">
<input name="NewsPublisherForm" type="hidden" value="on" />
<p>Note: Leaving the Publish Date empty will immediately publish your blog entry.</p>
<fieldset class="wrap_blue">
<legend>Entête du document</legend>
<label>Titre</label>
<input type="text" name="pagetitle" id="pagetitle" value="[+pagetitle+]" class="input" />
<label>Sous titre</label>
<input type="text" name="longtitle" id="longtitle" value="[+longtitle+]" class="input" />
<label>Description</label>
<input name="description" type="text" class="input" id="description" value="[+description+]" />
<label>Resume</label>
<textarea name="introtext" rows="1" class="summury" id="introtext">[+introtext+]</textarea>
</fieldset>
<fieldset class="wrap_grey">
<legend>Contenu du document</legend>
<label>Contenu</label>
[*blogContent*]
</fieldset>
<fieldset class="wrap_blue">
<legend>Publication</legend>
<label>Date de publication</label>
<div>
<div class="datepick_icon"><a onClick="nwpub_cal1.popup();" onMouseOver="window.status='Select date'; return true;" onMouseOut="window.status=''; return true;"><img src="manager/media/style/MODxLight/images/icons/cal.gif" width="16" height="16" alt="Select date" /></a></div>
<div class="datepick_icon"><a onClick="document.NewsPublisher.pub_date.value=''; return true;" onMouseOver="window.status='Remove date'; return true;" onMouseOut="window.status=''; return true;"><img src="manager/media/style/MODxLight/images/icons/cal_nodate.gif" width="16" height="16" alt="Remove date" /></a></div>
<input type="text" name="pub_date" id="pub_date" value="[+pub_date+]" class="input" />
</div>
<div class="buttons">
<input name="send" type="submit" value="PUBLIER L'ARTICLE" class="button" />
</div>
</fieldset>
</form>
<script type="JavaScript" src="manager/media/script/datefunctions.js"></script>
<script type="text/javascript">
var elm_txt = {}; // dummy
var pub = document.forms["NewsPublisher"].elements["pub_date"];
var nwpub_cal1 = new calendar1(pub,elm_txt);
nwpub_cal1.path="[+base_url+]manager/media/";
nwpub_cal1.year_scroll = true;
nwpub_cal1.time_comp = true;
</script>
When I try to publish a test article, I get
"Missing News Content". I followed the steps sugegsted in the documentation and even read a few posts including
http://modxcms.com/forums/index.php/topic,10726.0.html and
http://modxcms.com/forums/index.php?topic=881.0, but nobody seems to be able to figure out what’s going on.
Am I doing anything wrong here?