Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. Here is the xml block in question:
  2.  
  3.  
  4. <block type="review/product_view_list" name="product.info.product_additional_data" as="product_review" template="review/product/view/list.phtml">
  5. <block type="page/html_pager" name="product_review_list.toolbar" />
  6. <block type="core/template" name="product_review_list.count" template="review/product/view/count.phtml" />
  7. <block type="review/product_view_list" name="product.info.product_additional_data" as="product_additional_data" template="review/product/view/list.phtml">
  8. <block type="review/form" name="product.review.form" as="review_form">
  9. <block type="page/html_wrapper" name="product.review.form.fields.before" as="form_fields_before">
  10. <action method="setMayBeInvisible"><value>1</value></action>
  11. </block>
  12. </block>
  13. </block>
  14. </block>
  15.  
  16.  
  17. If I add this to /local.xml as per:
  18.  
  19. <catalog_product_view>
  20. <reference="content">
  21. <XML BLOCK GOES HERE>
  22. </reference>
  23. </catalog_product_view>
  24.  
  25. I get the exact content I want (including the pager toolbar), BUT it appears in the content area, at the same level as view.phtml, outside of my design layout. This appears BEFORE I add <? getChildHtml('product_review') ?> into view.phtml.
  26.  
  27. If I amend the local.xml to read:
  28.  
  29. <catalog_product_view>
  30. <reference="content">
  31. <block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml">
  32. <XML BLOCK GOES HERE>
  33. </block>
  34.  
  35. Then the entire view.phtml is duplicated (loaded within itself).
  36.  
  37.  
  38. If I add this block directly into catalog.xml (which I am trying to avoid), then it correctly does not appear until I add:
  39.  
  40. <?php echo $this->getChildHtml('product_review') ?>
  41.  
  42. and it appears in the correct place - HOWEVER - none of the sub blocks (such as <block type="page/html_pager" name="product_review_list.toolbar" /> ) get rendered, and they do exist with getChildHtml statements in the review/product/view/list.phtml file that is being loaded.
  43.  
  44. So - How can I get all of these blocks rendering FROM WITHIN the view.phtml, with sub blocks, and by using local.xml ?
  45.  
  46. Cheers!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement