Widgets are independent entities apart from the whole layout XML system. So calling the $this->getChildHtml()
method, which depends on layout XML, will not work in this case.
When you use $this->getChildHtml('review_list')
that actually means that somewhere in the layout XML a 'review_list' block is defined as a child of the current block. That is not the case here, so lets forget the getChildHtml for now.
When you create a widget in the content through a widget directive, thats the {{widget..}}
thingy you already talked about in your question, it is being parsed by a template filter.
This means that all logic for building up the content should be present in the Review_WidgetReviewTab_Block_List
. A proper widget also needs a widget.xml
in your module. In this xml file you can configure default settings but also define for instance which template should be used to render your widget. I attached a example at the bottom of my answer.
Displaying ratings of any kind means you probably need to load a helper or model via your widget block to get the needed data from the database.
A good tutorial to start building widgets:
https://www.magentocommerce.com/knowledge-base/entry/tutorial-creating-a-magento-widget-part-1
Widget example:
<?xml version="1.0"?>
<widgets>
<example type="review_widgetreviewtab/list">
<name>Widget name</name>
<description>Widget descriptoin</description>
<parameters>
<some_setting>
<label>Setting name</label>
<required>1</required>
<visible>1</visible>
<value>1</value>
<type>text</type>
</some_setting>
<template>
<required>1</required>
<type>select</type>
<value>widgets/my_widget_template.phtml</value>
</template>
</parameters>
</example>
review_list
defined in layout xml for Review_WidgetReviewTab_Block_List? If not you need to define it. – oleksii.svarychevskyi Feb 26 '14 at 12:00