KumpelJ
KumpelJ

Reputation: 45

Magento - is a block always needed for a widget?

I just started to develop Magento widgets and thereby I came to this problem/question:

It is possible to tell a Magento widget not to use a block-class and directly render a template file?

Thanks a lot

Upvotes: 1

Views: 97

Answers (1)

Kalpesh
Kalpesh

Reputation: 5685

Block is needed. If you don't want to create a new block, just give block type as cms/block. Remember, in your phtml template files, then you will not have your custom functions call by using $this (as $this references to Block).

Upvotes: 1

Related Questions