-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE layout> | ||
<!-- | ||
/** | ||
* app/design/frontend/base/default/layout/example.xml | ||
* | ||
* This example code is provided for use with the Mastering Magento video | ||
* series, by Packt Publishing. | ||
* | ||
* @author Franklin P. Strube <franklin.strube@gmail.com> | ||
* @category MasteringMagento | ||
* @package Example | ||
* @copyright Copyright (c) 2012 Packt Publishing (http://packtpub.com) | ||
*/ | ||
--> | ||
<layout version="0.1.0"> | ||
<example_index_index> | ||
<update handle="page_two_columns_right" /> | ||
</example_index_index> | ||
</layout> |
c3b0511
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2.8 Recap: Creating Frontend Layouts
A layout is a special type of file that is part of the Magento View Layer. The XML syntax determines which components will be visible on the Magento page.
Modify
config.xml
Added
<layout>
snippet in the<frontend>
section to define a new layout file:example.xml
.Created Layout File
We created the associated
example.xml
layout file inapp/design/frontend/base/default/layout/example.xml
.Modify Controllers
We then had to modify the controllers to use the layout file and render the layout file by using
$this->loadLayout()
and$this->renderLayout()
.