开发者

Drupal: building a users-submitted testimonials page

What's the easiest way to create a testimonial page in Drupal ?

I need the users be able to add a comment on the bottom of the page, and I need to approve them before they can be published.

I could use views + webform module for it开发者_运维百科 ? Or is there something simpler ?

thanks


Create a content type called "Testimonials" and set it to default Unpublished. Call the Title field "Name" and the body field "Testimonial".

Create a View called testimonials with a page attachment that lists out nodes of type "testimonial" with a filter for Published = Yes. Set the path to "/testimonials".

Use the Form Block module (http://drupal.org/project/formblock) to put the Node Add form for the Testimonial content page into a block.

Configure the block you created to appear at the bottom of the testimonial page (your theme should have a "Content bottom" region, if not you'll need to add one by editing the theme's page.tpl.php and $theme.info file.

To approve a testimonial, go to the content list, filter by Type: Testimonial and Status: Unpublished then use the checkboxes and the drop-down to change the status to "Published".

This will provide a page that lists testimonials, with an "add testimonial" form at the bottom of the page, and all testimonials must be approved before they will appear on the site.


If your criteria for a testimonial is just a block of text then creating a "testimonial" content type would work. You could allow users to create them but require admin approval to be published.

You can also change the access control for comment approval


Edit:

This was going to be my follow-up comment when you clarified that you wanted a form at the bottom of an existing page.

I don't know if this works, but try viewing the HTML source of /node/add/testimonial in your browser and copy everything from <form action="/node/add/page"... to the closing </form> tag.

Gah. That sounds hideously complicated. If you want a form at the bottom of an existing page then maybe the plugin you mentioned is the best option (but I haven't researched it).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜