SlideShare a Scribd company logo
Magento

                                     2010/02/26
                          Magento-JP User Group




2010   2   26
•
                •
                • Magento
                • Twitter@hirokazu_nishi

2010   2   26
• Magento
                • Magento
                •           XML

                • Block
                •
2010   2   26
Magento




2010   2   26
app   code        core
                                  community
                                  local
                      design      frontend
                                  adminhtml
                      etc
                      locale
                lib
                js                            JS

                skin frontend
                      adminhtml

2010   2   26
2010   2   26
design frontend default default layout     XML




                                                locale



                                                template



                                foo     bar


2010   2   26
design frontend default default layout     XML




                                                locale



                                                template



                                foo     bar


2010   2   26
design frontend default default layout     XML




                                                locale



                                                template



                                foo     bar


2010   2   26
•
                •


2010   2   26
Magento




2010   2   26
2010   2   26
2010   2   26
2010   2   26
<?php $collection = $this->getItems(3); ?>
  <?php if ( count($collection) == 0 ) : ?>
  	

  <p><?php echo $this->__('No news yet...'); ?></p>
  <?php else : ?>
  	

  <dl>
  	

  <?php foreach ( $collection as $_item ) : ?>
  	

  	

  <dt><a href="<?php echo Mage::helper('snews')->getUrl($_item['identifier']); ?>"><?php
  echo $_item['title']; ?></a></dt>
  	

  	

  <dd><?php echo $_item['date']; ?></dd>
  	

  	

  <dd>
  	

  	

  <?php if ( Mage::helper('snews')->getListLimitDescription() == 0 || strlen($_item
  ['description']) < Mage::helper('snews')->getListLimitDescription() ) : ?>
  	

  	

  	

   <?php echo $_item['description']; ?>
  	

  	

  <?php else : ?>
  	

  	

  	

   <?php echo substr($_item['description'], 0, Mage::helper('snews')-
  >getListLimitDescription()); ?>...
  	

  	

  <?php endif; ?>	

  	

  	

  </dd>
  	

  	

  <dd><a href="<?php echo Mage::helper('snews')->getUrl($_item['identifier']); ?>"><?php
  echo $this->__('Learn more...'); ?></a></dd>
  	

  <?php endforeach; ?>
  	

  </dl>	

  <?php endif; ?>


2010   2   26
• if      endif

                • foreach       endforeach

                • $this->hogehoge


2010   2   26
XML



2010   2   26
XML
                •               XML

                •
                •

                •   XML



2010   2   26
XML



2010   2   26
<?xml version="1.0"?>
       <layout version="0.1.0">
       ! <default>
       ! ! <!--
       ! ! <reference name="right">
       ! ! ! <block type="snews/block" name="snews.block" as="newsBlock" template="scalena/
       news/block.phtml"/>
       ! ! </reference>
       ! ! -->
       ! </default>
       ! <snews_index_index>
               <reference name="root">
                    <action method="setTemplate"><template>page/2columns-right.phtml</
       template></action>
               </reference>
               <reference name="content">
                    <block type="snews/items" name="snews.news" template="scalena/news/
       news.phtml">
       !               <block type="snews/pagination" name="snews.pagination" as="pagination"
       template="scalena/news/pagination.phtml"/>
                    </block>
               </reference>
           </snews_index_index>
           <snews_index_view>
               <reference name="root">
                    <action method="setTemplate"><template>page/2columns-right.phtml</
       template></action>
               </reference>
               <reference name="content">
                    <block type="snews/item" name="snews.detail" template="scalena/news/news-
       detail.phtml" />
               </reference>
           </snews_index_view>
       </layout>

2010   2   26
•   block
                •   reference
                •   action
                •   remove

2010   2   26
block

                •
                    •
                    • <block type=”foo” name=”foo”
                      template=”foo.phtml” />



2010   2   26
<?xml version="1.0"?>
       <layout version="0.1.0">
       ! <default>
       ! ! <!--
       ! ! <reference name="right">
       ! ! ! <block type="snews/block" name="snews.block" as="newsBlock" template="scalena/
       news/block.phtml"/>
       ! ! </reference>
       ! ! -->
       ! </default>
       ! <snews_index_index>
               <reference name="root">
                    <action method="setTemplate"><template>page/2columns-right.phtml</
       template></action>
               </reference>
               <reference name="content">
                    <block type="snews/items" name="snews.news" template="scalena/news/
       news.phtml">
       !               <block type="snews/pagination" name="snews.pagination" as="pagination"
       template="scalena/news/pagination.phtml"/>
                    </block>
               </reference>
           </snews_index_index>
           <snews_index_view>
               <reference name="root">
                    <action method="setTemplate"><template>page/2columns-right.phtml</
       template></action>
               </reference>
               <reference name="content">
                    <block type="snews/item" name="snews.detail" template="scalena/news/news-
       detail.phtml" />
               </reference>
           </snews_index_view>
       </layout>

2010   2   26
reference


                • name=”foo”
                 • <reference name=”foo”>


2010   2   26
<?xml version="1.0"?>
       <layout version="0.1.0">
       ! <default>
       ! ! <!--
       ! ! <reference name="right">
       ! ! ! <block type="snews/block" name="snews.block" as="newsBlock" template="scalena/
       news/block.phtml"/>
       ! ! </reference>
       ! ! -->
       ! </default>
       ! <snews_index_index>
               <reference name="root">
                    <action method="setTemplate"><template>page/2columns-right.phtml</
       template></action>
               </reference>
               <reference name="content">
                    <block type="snews/items" name="snews.news" template="scalena/news/
       news.phtml">
       !               <block type="snews/pagination" name="snews.pagination" as="pagination"
       template="scalena/news/pagination.phtml"/>
                    </block>
               </reference>
           </snews_index_index>
           <snews_index_view>
               <reference name="root">
                    <action method="setTemplate"><template>page/2columns-right.phtml</
       template></action>
               </reference>
               <reference name="content">
                    <block type="snews/item" name="snews.detail" template="scalena/news/news-
       detail.phtml" />
               </reference>
           </snews_index_view>
       </layout>

2010   2   26
action

                • block
                • block
                 •
                • <action method=”foo”>   </
                  action>


2010   2   26
<?xml version="1.0"?>
       <layout version="0.1.0">
       ! <default>
       ! ! <!--
       ! ! <reference name="right">
       ! ! ! <block type="snews/block" name="snews.block" as="newsBlock" template="scalena/
       news/block.phtml"/>
       ! ! </reference>
       ! ! -->
       ! </default>
       ! <snews_index_index>
               <reference name="root">
                    <action method="setTemplate"><template>page/2columns-right.phtml</
       template></action>
               </reference>
               <reference name="content">
                    <block type="snews/items" name="snews.news" template="scalena/news/
       news.phtml">
       !               <block type="snews/pagination" name="snews.pagination" as="pagination"
       template="scalena/news/pagination.phtml"/>
                    </block>
               </reference>
           </snews_index_index>
           <snews_index_view>
               <reference name="root">
                    <action method="setTemplate"><template>page/2columns-right.phtml</
       template></action>
               </reference>
               <reference name="content">
                    <block type="snews/item" name="snews.detail" template="scalena/news/news-
       detail.phtml" />
               </reference>
           </snews_index_view>
       </layout>

2010   2   26
remove

                •
                • <remove name=”foo”/>
                •


2010   2   26
Block



2010   2   26
Block
                •    XML       block



                •          .phtml

                •    XML       public



                •    XML


2010   2   26
Block
       <block type="foo/foo" name="foo.foo">

                <block type="foo/bar" name="foo.bar" as="bar"/>




       </block>




2010   2   26
• $this->getChildHtml(‘foo’);
                •


2010   2   26
• CMS   XML



                •


2010   2   26
• {{block type=”cms/block” block_id=”hoge”
                  template=”cms/content.phtml”}}
                • {{widget type="cms/widget_block"
                  template="cms/widget/static_block/
                  default.phtml" block_id="5"}}




2010   2   26
• <block type=”cms/block”
                  name=”hoge” (before|after)=”foo”>
                    <action method=”setBlockId”>
                       hoge
                    </action>
                  </block>



2010   2   26
2010   2   26
•   HTML

                •   JS   CSS

                •



2010   2   26
•
                          OK

                •

                •   CSS        JS


2010   2   26
2010   2   26

More Related Content

PDF
Magento20100807
PDF
Magento20100709
PPT
Bài 12: JSF-2 - Lập Trình Mạng Nâng Cao
PDF
Drupal Module Development
PDF
날로 먹는 Django admin 활용
KEY
Django Admin: Widgetry & Witchery
PDF
How to create a magento controller in magento extension
PDF
How to Create A Magento Adminhtml Controller in Magento Extension
Magento20100807
Magento20100709
Bài 12: JSF-2 - Lập Trình Mạng Nâng Cao
Drupal Module Development
날로 먹는 Django admin 활용
Django Admin: Widgetry & Witchery
How to create a magento controller in magento extension
How to Create A Magento Adminhtml Controller in Magento Extension

What's hot (20)

PDF
Profit statement 00
PDF
Inchoo s magento posts
PDF
Working with the django admin
PDF
MTDDC Meetup TOKYO 2016
PDF
How to Develop a Basic Magento Extension Tutorial
PDF
Two scoops of django 1.6 - Ch7, Ch8
PDF
How to Think Inside the Box: Programming Fixed Layout for E-Books
PDF
JavaFXで開く新世代GUI
PPTX
DJango admin interface
PDF
Odoo Experience 2018 - From a Web Controller to a Full CMS
PPTX
Odoo (Build module, Security, ORM)
PDF
Odoo Experience 2018 - The Odoo JS Framework
TXT
Links/Деловой и денежный мир
DOC
Ôn tập KTTMDT
PDF
Developing a Joomla 3.x Component using RAD FOF- Part 1: Back-end - Joomladay...
PPTX
Jsf lab
PPT
Система рендеринга в Magento
PPT
Presentation
PDF
Zepplin_Pronko_Magento_Festival Hall 1_Final
ZIP
Drupal Development
Profit statement 00
Inchoo s magento posts
Working with the django admin
MTDDC Meetup TOKYO 2016
How to Develop a Basic Magento Extension Tutorial
Two scoops of django 1.6 - Ch7, Ch8
How to Think Inside the Box: Programming Fixed Layout for E-Books
JavaFXで開く新世代GUI
DJango admin interface
Odoo Experience 2018 - From a Web Controller to a Full CMS
Odoo (Build module, Security, ORM)
Odoo Experience 2018 - The Odoo JS Framework
Links/Деловой и денежный мир
Ôn tập KTTMDT
Developing a Joomla 3.x Component using RAD FOF- Part 1: Back-end - Joomladay...
Jsf lab
Система рендеринга в Magento
Presentation
Zepplin_Pronko_Magento_Festival Hall 1_Final
Drupal Development
Ad

Similar to Magento20100226 (20)

PDF
Magento20100313
PDF
Amplexor drupalcamp-gent-2012 - kinepolis platform
PDF
Grok Drupal (7) Theming - 2011 Feb update
PDF
SuperMondays, July 2011
PDF
Drupal 8. What's cooking (based on Angela Byron slides)
PDF
Amplexor drupal-high trafficwebsites-2012-03-08
PPT
Introduction to web design
PDF
Drupal 6 my experience
PDF
Maintainable Frontend Development with BEM
PDF
Grok Drupal (7) Theming
ODP
Introduction to web design
KEY
Templates
PDF
Designing for magento
PDF
Introduction to Drupal (7) Theming
PDF
Confluence Theming 101: How to Build a Theme - Atlassian Summit 2010 - Lightn...
PDF
Beginner & Intermediate Guide to HTML5/CSS3 In Drupal
PPTX
In Pursuit of the Grand Unified Template
PDF
How to Write Custom Modules for PHP-based E-Commerce Systems (2011)
PDF
Netsuite e commerce training doc
PDF
Tutorial%20-%20Content%20Management%20System
Magento20100313
Amplexor drupalcamp-gent-2012 - kinepolis platform
Grok Drupal (7) Theming - 2011 Feb update
SuperMondays, July 2011
Drupal 8. What's cooking (based on Angela Byron slides)
Amplexor drupal-high trafficwebsites-2012-03-08
Introduction to web design
Drupal 6 my experience
Maintainable Frontend Development with BEM
Grok Drupal (7) Theming
Introduction to web design
Templates
Designing for magento
Introduction to Drupal (7) Theming
Confluence Theming 101: How to Build a Theme - Atlassian Summit 2010 - Lightn...
Beginner & Intermediate Guide to HTML5/CSS3 In Drupal
In Pursuit of the Grand Unified Template
How to Write Custom Modules for PHP-based E-Commerce Systems (2011)
Netsuite e commerce training doc
Tutorial%20-%20Content%20Management%20System
Ad

More from Hirokazu Nishi (19)

PPTX
Magento Meetup Tokyo 14 〜メンテナンス画面を極める
PPTX
JP_Stripes Vol3 発表資料
PPTX
20170626 さくらインターネット Stripe Magento
PPTX
How to implement payment gateway integration for non-credit card on Magento2
PPTX
Magento cafe plus #12
PPTX
第9回 Magento Cafe Plus
PDF
第1回 Magento Cafe Plus Kansai ~ Magentoカスタマイズ入門
PDF
第8回 Magento cafe plus
PDF
第7回 Magento Cafe Plus
PDF
Magento Cafe Plus #6
PDF
第4回Magento Cafe Plus〜Rewriteと独自テーブル
PDF
第4回Magento Cafe Plus〜最近のMagento
PDF
第3回 Magento Cafe Plus モジュール開発入門
PDF
第2回 Magento cafe plus 〜新・Magentoカスタマイズ入門
PDF
Akeneo PIM Overview
PDF
Magento2 Overview
PDF
Magento cafe tokyo2~デザイナー向けMagentoの歩き方
PDF
最新・Magentoを日本語で使うイロハ
PDF
加速していくMagento 〜MDP2011参加レポート〜
Magento Meetup Tokyo 14 〜メンテナンス画面を極める
JP_Stripes Vol3 発表資料
20170626 さくらインターネット Stripe Magento
How to implement payment gateway integration for non-credit card on Magento2
Magento cafe plus #12
第9回 Magento Cafe Plus
第1回 Magento Cafe Plus Kansai ~ Magentoカスタマイズ入門
第8回 Magento cafe plus
第7回 Magento Cafe Plus
Magento Cafe Plus #6
第4回Magento Cafe Plus〜Rewriteと独自テーブル
第4回Magento Cafe Plus〜最近のMagento
第3回 Magento Cafe Plus モジュール開発入門
第2回 Magento cafe plus 〜新・Magentoカスタマイズ入門
Akeneo PIM Overview
Magento2 Overview
Magento cafe tokyo2~デザイナー向けMagentoの歩き方
最新・Magentoを日本語で使うイロハ
加速していくMagento 〜MDP2011参加レポート〜

Recently uploaded (20)

PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
August Patch Tuesday
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Encapsulation theory and applications.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Mushroom cultivation and it's methods.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Approach and Philosophy of On baking technology
PPTX
Machine Learning_overview_presentation.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Spectroscopy.pptx food analysis technology
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
cloud_computing_Infrastucture_as_cloud_p
A comparative analysis of optical character recognition models for extracting...
Programs and apps: productivity, graphics, security and other tools
August Patch Tuesday
Empathic Computing: Creating Shared Understanding
Digital-Transformation-Roadmap-for-Companies.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
A comparative study of natural language inference in Swahili using monolingua...
Encapsulation theory and applications.pdf
Encapsulation_ Review paper, used for researhc scholars
Mobile App Security Testing_ A Comprehensive Guide.pdf
Mushroom cultivation and it's methods.pdf
Unlocking AI with Model Context Protocol (MCP)
Approach and Philosophy of On baking technology
Machine Learning_overview_presentation.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
Spectroscopy.pptx food analysis technology
NewMind AI Weekly Chronicles - August'25-Week II
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf

Magento20100226

  • 1. Magento 2010/02/26 Magento-JP User Group 2010 2 26
  • 2. • • Magento • Twitter@hirokazu_nishi 2010 2 26
  • 3. • Magento • Magento • XML • Block • 2010 2 26
  • 5. app code core community local design frontend adminhtml etc locale lib js JS skin frontend adminhtml 2010 2 26
  • 6. 2010 2 26
  • 7. design frontend default default layout XML locale template foo bar 2010 2 26
  • 8. design frontend default default layout XML locale template foo bar 2010 2 26
  • 9. design frontend default default layout XML locale template foo bar 2010 2 26
  • 10. • 2010 2 26
  • 11. Magento 2010 2 26
  • 12. 2010 2 26
  • 13. 2010 2 26
  • 14. 2010 2 26
  • 15. <?php $collection = $this->getItems(3); ?> <?php if ( count($collection) == 0 ) : ?> <p><?php echo $this->__('No news yet...'); ?></p> <?php else : ?> <dl> <?php foreach ( $collection as $_item ) : ?> <dt><a href="<?php echo Mage::helper('snews')->getUrl($_item['identifier']); ?>"><?php echo $_item['title']; ?></a></dt> <dd><?php echo $_item['date']; ?></dd> <dd> <?php if ( Mage::helper('snews')->getListLimitDescription() == 0 || strlen($_item ['description']) < Mage::helper('snews')->getListLimitDescription() ) : ?> <?php echo $_item['description']; ?> <?php else : ?> <?php echo substr($_item['description'], 0, Mage::helper('snews')- >getListLimitDescription()); ?>... <?php endif; ?> </dd> <dd><a href="<?php echo Mage::helper('snews')->getUrl($_item['identifier']); ?>"><?php echo $this->__('Learn more...'); ?></a></dd> <?php endforeach; ?> </dl> <?php endif; ?> 2010 2 26
  • 16. • if endif • foreach endforeach • $this->hogehoge 2010 2 26
  • 17. XML 2010 2 26
  • 18. XML • XML • • • XML 2010 2 26
  • 19. XML 2010 2 26
  • 20. <?xml version="1.0"?> <layout version="0.1.0"> ! <default> ! ! <!-- ! ! <reference name="right"> ! ! ! <block type="snews/block" name="snews.block" as="newsBlock" template="scalena/ news/block.phtml"/> ! ! </reference> ! ! --> ! </default> ! <snews_index_index> <reference name="root"> <action method="setTemplate"><template>page/2columns-right.phtml</ template></action> </reference> <reference name="content"> <block type="snews/items" name="snews.news" template="scalena/news/ news.phtml"> ! <block type="snews/pagination" name="snews.pagination" as="pagination" template="scalena/news/pagination.phtml"/> </block> </reference> </snews_index_index> <snews_index_view> <reference name="root"> <action method="setTemplate"><template>page/2columns-right.phtml</ template></action> </reference> <reference name="content"> <block type="snews/item" name="snews.detail" template="scalena/news/news- detail.phtml" /> </reference> </snews_index_view> </layout> 2010 2 26
  • 21. block • reference • action • remove 2010 2 26
  • 22. block • • • <block type=”foo” name=”foo” template=”foo.phtml” /> 2010 2 26
  • 23. <?xml version="1.0"?> <layout version="0.1.0"> ! <default> ! ! <!-- ! ! <reference name="right"> ! ! ! <block type="snews/block" name="snews.block" as="newsBlock" template="scalena/ news/block.phtml"/> ! ! </reference> ! ! --> ! </default> ! <snews_index_index> <reference name="root"> <action method="setTemplate"><template>page/2columns-right.phtml</ template></action> </reference> <reference name="content"> <block type="snews/items" name="snews.news" template="scalena/news/ news.phtml"> ! <block type="snews/pagination" name="snews.pagination" as="pagination" template="scalena/news/pagination.phtml"/> </block> </reference> </snews_index_index> <snews_index_view> <reference name="root"> <action method="setTemplate"><template>page/2columns-right.phtml</ template></action> </reference> <reference name="content"> <block type="snews/item" name="snews.detail" template="scalena/news/news- detail.phtml" /> </reference> </snews_index_view> </layout> 2010 2 26
  • 24. reference • name=”foo” • <reference name=”foo”> 2010 2 26
  • 25. <?xml version="1.0"?> <layout version="0.1.0"> ! <default> ! ! <!-- ! ! <reference name="right"> ! ! ! <block type="snews/block" name="snews.block" as="newsBlock" template="scalena/ news/block.phtml"/> ! ! </reference> ! ! --> ! </default> ! <snews_index_index> <reference name="root"> <action method="setTemplate"><template>page/2columns-right.phtml</ template></action> </reference> <reference name="content"> <block type="snews/items" name="snews.news" template="scalena/news/ news.phtml"> ! <block type="snews/pagination" name="snews.pagination" as="pagination" template="scalena/news/pagination.phtml"/> </block> </reference> </snews_index_index> <snews_index_view> <reference name="root"> <action method="setTemplate"><template>page/2columns-right.phtml</ template></action> </reference> <reference name="content"> <block type="snews/item" name="snews.detail" template="scalena/news/news- detail.phtml" /> </reference> </snews_index_view> </layout> 2010 2 26
  • 26. action • block • block • • <action method=”foo”> </ action> 2010 2 26
  • 27. <?xml version="1.0"?> <layout version="0.1.0"> ! <default> ! ! <!-- ! ! <reference name="right"> ! ! ! <block type="snews/block" name="snews.block" as="newsBlock" template="scalena/ news/block.phtml"/> ! ! </reference> ! ! --> ! </default> ! <snews_index_index> <reference name="root"> <action method="setTemplate"><template>page/2columns-right.phtml</ template></action> </reference> <reference name="content"> <block type="snews/items" name="snews.news" template="scalena/news/ news.phtml"> ! <block type="snews/pagination" name="snews.pagination" as="pagination" template="scalena/news/pagination.phtml"/> </block> </reference> </snews_index_index> <snews_index_view> <reference name="root"> <action method="setTemplate"><template>page/2columns-right.phtml</ template></action> </reference> <reference name="content"> <block type="snews/item" name="snews.detail" template="scalena/news/news- detail.phtml" /> </reference> </snews_index_view> </layout> 2010 2 26
  • 28. remove • • <remove name=”foo”/> • 2010 2 26
  • 29. Block 2010 2 26
  • 30. Block • XML block • .phtml • XML public • XML 2010 2 26
  • 31. Block <block type="foo/foo" name="foo.foo"> <block type="foo/bar" name="foo.bar" as="bar"/> </block> 2010 2 26
  • 33. • CMS XML • 2010 2 26
  • 34. • {{block type=”cms/block” block_id=”hoge” template=”cms/content.phtml”}} • {{widget type="cms/widget_block" template="cms/widget/static_block/ default.phtml" block_id="5"}} 2010 2 26
  • 35. • <block type=”cms/block” name=”hoge” (before|after)=”foo”> <action method=”setBlockId”> hoge </action> </block> 2010 2 26
  • 36. 2010 2 26
  • 37. HTML • JS CSS • 2010 2 26
  • 38. OK • • CSS JS 2010 2 26
  • 39. 2010 2 26