I’m developing some Views for a Magento module, and I was wondering if there are shortcut functions that can be used to generate HTML tags instead of the usual printf/sprintf. For example, some frameworks offer functions such as Anchor(), which, given a text, transforms it into a full tag, or TextBox(), which prints a full tag.
Does Magento have anything similar, or do I have to stick to the “printf” method? Thanks in advance for the answers.
No, Magento’s Blocks (which is what I assume you’re asking about re: Views) don’t offer HTML generation methods. You’ll need to manually generate HTML code in PHP or use template blocks, which allow you to write your own html code in
phtmltemplate files, and then intersperse that code with calls toor
depending on how you role