cancel
Showing results for 
Search instead for 
Did you mean: 

Calling helper method from static block

SOLVED

Calling helper method from static block

I've written a small custom module with a helper that contains a couple of methods.

I managed pretty easily to call one of these methods from inside my list.phtml file using the line

<?php  Mage::helper('module/getcatinfo')->getCatInfo();?>

but my method always echos it's output below the attached CMS block, whereas I'd like to call it at the very top of the page - I assume that the way around this issue is to call the function from inside the CMS block instead of inside my list.phtml file.

 

How can I go about doing this please?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Calling helper method from static block

Solved this by calling my method in catalog/category/view.phtml instead of catalog/product/list.phtml.

The code in catalog/category/view.phtml made it pretty obvious where to call my method to have it come before the static block.

View solution in original post

1 REPLY 1

Re: Calling helper method from static block

Solved this by calling my method in catalog/category/view.phtml instead of catalog/product/list.phtml.

The code in catalog/category/view.phtml made it pretty obvious where to call my method to have it come before the static block.