Forum OpenACS Q&A: Response to General-Comments with Edit-This-Page?

Collapse
Posted by Neophytos Demetriou on
Add etp::get_gc_link to edit-this-page/templates/article-content.tcl Add to edit-this-page/templates/article-content.adp:

<if @comments@ not nil>
@comments@
<p>
@comments_link@
</if>
Modify get_gc_link as follows (inside a file under edit-this-page/tcl):

 ad_proc -public get_gc_link { } { } {
        upvar pa pa
        upvar comments comments
        upvar comments_link comments_link
        set item_id $pa(item_id)
        set object_name $pa(title)
        set comments ""
        set comments_link ""

        append comments_link [general_comments_create_link -link_text "Blah Blah Add a comment" -object_name $object_name $item_id [ad_conn url]]
        append comments [general_comments_get_comments -print_content_p 1 -print_attachments_p 1 $item_id ]



}