How can the following be accomplished in Magento?
-
Display a “Hello World” message using a controller/view/model approach. So, if I went to
http://example.com/myController
it would show the string ‘Hello World’. Being able to show this string within the template of my website (for example, the header, footer, etc.) will be a bonus. -
How do I add a method to this controller (or a new controller if necessary), which interacts with a model, and performs the query
Select * FROM articles where id='10'
and returns the row (containing the columnsid, title, content
) to the controller? And then use the controller to include a view, which would display this row. So going tohttp://example.com/myController/show_row
(or something similar) would display the row within a view. (No need to be fancy, just aecho $row->id;
or something similar would work.)
Any other information about Magento’s code structure will also be very helpful.