Hi guys,
I have a weblog displayed on my main page; the code is as follows:
{exp:weblog:entries status="Unanswered|Answered" weblog="Qs" limit="6" orderby="date" sort="desc"}
<div class="Q" id="Q{entry_id}">
/fonebox/webroot/images/uploads/{status}.jpg
<span>{Question}</span><br>
<span class="Q_date">{entry_date format='%M %d, %Y'} - {entry_date format='%g:%i'} - By {username}</span><br>
<span class="Q_tags">Tags:</span><br>
<span class="Q_actions">
<span>Respond</span>
<span>-</span>
<a href="http://">Track</a>
<span>-</span>
<a href="http://">Share</a>
</span><br>
<div class="A" id="A{entry_id}">{embed="fonebox/AnswerForm" fb_weblog="Qs" fb_entry_id="{entry_id}"}</div>
</div>
<br><br> {!-- This line is used as a cutting point by Scripts, so don't modify it.
Also, don't use two consecutive <br> tags anywhere else in this template. --}
{/exp:weblog:entries}As you can see, the weblog name is ‘Qs’ (short for “Questions”).
I wish to display a comment entry form alongside each weblog entry. Thus I pass variables ‘fb_weblog’ (the weblog name) and ‘fb_entry_id’ (the weblog entry id) to an embedded template containing the comment entry form. Here is that template:
{exp:comment:form weblog="{embed:fb_weblog}" entry_id="{embed:fb_entry_id}" preview="fonebox/AnswerPreview"}
<input type="text" name="name" value="{name}" size="50"/>
<input type="text" name="email" value="{email}" size="50"/>
<input type="text" name="location" value="{location}" size="50"/>
<input type="text" name="url" value="{url}" size="50"/>
<textarea name="comment" cols="70" rows="10">{comment}</textarea></p>
<input type="checkbox" name="save_info" value="yes" {save_info} /> Remember my personal information
<input type="checkbox" name="notify_me" value="yes" {notify_me} /> Notify me of follow-up comments?
{if captcha}
Please enter the word you see in the image below:
{captcha}
<input type="text" name="captcha" value="{captcha_word}" maxlength="20" /></p>
{/if}
<input type="submit" name="submit" value="Submit" />
<input type="submit" name="preview" value="Preview" />
{/exp:comment:form}The code in this embedded template is, for now, the example provided in the documentation pages. I have merely added my passed variables as parameters ‘{weblog}’ and ‘{entry_id}’ to the template.
..Yet nothing displays. I have allowed the relevant member groups to view comments by author authors. I have allowed comments to be posted in the weblog Questions. There is no syntactical error that I can see. What am I doing wrong? I’ve read that you should have an entry id in the URL, in the form /path/to/entry_id - this is the one thing I’m not doing. However, given that I pass the entry id to the comment submission form template (via my ‘fb_entry_id’) I assume this isn’t required?
I’d be very grateful for any assistance, this has me stumped!
Best,
Dave