SlideShare una empresa de Scribd logo
1 de 47
Descargar para leer sin conexión
Magento


                                     2010/03/13
                          Magento-JP User Group




2010   3   14
•
                • Magento
                • Twitter@hirokazu_nishi


2010   3   14
•   Magento

                •   Magento

                •             XML

                •   Block
                •
                •   Tips


2010   3   14
Magento




2010   3   14
app   code        core
                                  community
                                  local
                      design      frontend
                                  adminhtml
                      etc
                      locale
                lib
                js                            javascript

                skin frontend
                      adminhtml

2010   3   14
2010   3   14
design frontend default default layout     XML




                                                locale



                                                template



                                foo     bar


2010   3   14
design frontend default default layout     XML




                                                locale



                                                template



                                foo     bar


2010   3   14
design frontend default default layout     XML




                                                locale



                                                template



                                foo     bar


2010   3   14
Magento




2010   3   14
•
                •
                •


2010   3   14
-Scalena News-


2010   3   14
<?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   3   14
• if      endif;

                • foreach        endforeach;

                • $this->hogehoge
                •                  PHP



2010   3   14
•
                •   XML




2010   3   14
• page
                 •
                 •


2010   3   14
XML



2010   3   14
XML
                •               XML

                •
                •

                •   XML



2010   3   14
2010   3   14
2010   3   14
XML




2010   3   14
XML
                -Scalena News-


2010   3   14
<?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   3   14
•   block
                •   reference
                •   action
                •   remove

2010   3   14
block

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



2010   3   14
<?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   3   14
reference


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


2010   3   14
<?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   3   14
action

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


2010   3   14
<?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   3   14
remove

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


2010   3   14
•   CMS

                •
                •

                •         XML


2010   3   14
Block



2010   3   14
Block
                •    XML       block



                •          .phtml

                •    XML       public



                •    XML


2010   3   14
Block
       <block type="foo/foo" name="foo.foo">

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




       </block>




2010   3   14
• $this->getChildHtml(‘foo’);
                •


2010   3   14
•   Mage_Core_Model_Layout
                    createBlock



                •   core            grep

                •                 XML




2010   3   14
• CMS        XML



                •
                • Free_CMS


2010   3   14
• 1.3
                  {{block type=”cms/block” block_id=”hoge”
                  template=”cms/content.phtml”}}
                • 1.4
                  {{widget type="cms/widget_block"
                  template="cms/widget/static_block/
                  default.phtml" block_id="5"}}


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



2010   3   14
2010   3   14
•   HTML

                •   JS   CSS

                •



2010   3   14
•
                          OK

                •

                •   CSS        JS


2010   3   14
Tips



2010   3   14
<remove name=”breadcrumbs” />
            <reference name=”breadcrumbs”>
                <action method=”addCrumnb”>
                    <label>home</label>
                    <params>
                        <label>home</label>
                        <title>     </title>
                        <link>home</link>
                        <first>true</first>
                    </params>
                </action>
                <action method=”addCrumnb”>
                    <label>foofoo</label>
                    <params>
                        <label>       </label>
                        <title>       </title>
                         <link/>
                         <last>true</last>
                    </params>
                </action>
            </reference>


2010   3   14
<reference name=”top.links”>
               <action method=”addLink” translate=”label title” module=”customer”>
                   <label>       </label>
                    <url>/hogehoge</url>
                    <title>       </title>
                    <prepare/>
                    <urlParams/>
                    <position>90</position>
                </action>
                <action method=”addLink” translate=”label title” module=”customer”>
                    <label>       </label>
                    <url>/fugefuge</url>
                    <title>       </title>
                   <prepare/>
                   <urlParams/>
                   <position>100</position>
               </action>
           </reference>



2010   3   14
2010   3   14

Más contenido relacionado

La actualidad más candente

Inchoo s magento posts
Inchoo s magento postsInchoo s magento posts
Inchoo s magento posts
Tuyến Trần
 
How to Develop a Basic Magento Extension Tutorial
How to Develop a Basic Magento Extension TutorialHow to Develop a Basic Magento Extension Tutorial
How to Develop a Basic Magento Extension Tutorial
Hendy Irawan
 
Magento 2.0: Prepare yourself for a new way of module development
Magento 2.0: Prepare yourself for a new way of module developmentMagento 2.0: Prepare yourself for a new way of module development
Magento 2.0: Prepare yourself for a new way of module development
Ivan Chepurnyi
 
Ôn tập KTTMDT
Ôn tập KTTMDTÔn tập KTTMDT
Ôn tập KTTMDT
mrcoffee282
 
Система рендеринга в Magento
Система рендеринга в MagentoСистема рендеринга в Magento
Система рендеринга в Magento
Magecom Ukraine
 
Zepplin_Pronko_Magento_Festival Hall 1_Final
Zepplin_Pronko_Magento_Festival Hall 1_FinalZepplin_Pronko_Magento_Festival Hall 1_Final
Zepplin_Pronko_Magento_Festival Hall 1_Final
Max Pronko
 

La actualidad más candente (19)

Profit statement 00
Profit statement 00Profit statement 00
Profit statement 00
 
Working with the django admin
Working with the django admin Working with the django admin
Working with the django admin
 
Inchoo s magento posts
Inchoo s magento postsInchoo s magento posts
Inchoo s magento posts
 
Two scoops of django 1.6 - Ch7, Ch8
Two scoops of django 1.6  - Ch7, Ch8Two scoops of django 1.6  - Ch7, Ch8
Two scoops of django 1.6 - Ch7, Ch8
 
How to Develop a Basic Magento Extension Tutorial
How to Develop a Basic Magento Extension TutorialHow to Develop a Basic Magento Extension Tutorial
How to Develop a Basic Magento Extension Tutorial
 
Magento 2.0: Prepare yourself for a new way of module development
Magento 2.0: Prepare yourself for a new way of module developmentMagento 2.0: Prepare yourself for a new way of module development
Magento 2.0: Prepare yourself for a new way of module development
 
May the core be with you - JandBeyond 2014
May the core be with you - JandBeyond 2014May the core be with you - JandBeyond 2014
May the core be with you - JandBeyond 2014
 
How to Think Inside the Box: Programming Fixed Layout for E-Books
How to Think Inside the Box: Programming Fixed Layout for E-BooksHow to Think Inside the Box: Programming Fixed Layout for E-Books
How to Think Inside the Box: Programming Fixed Layout for E-Books
 
DJango admin interface
DJango admin interfaceDJango admin interface
DJango admin interface
 
Odoo (Build module, Security, ORM)
Odoo (Build module, Security, ORM)Odoo (Build module, Security, ORM)
Odoo (Build module, Security, ORM)
 
JavaFXで開く新世代GUI
JavaFXで開く新世代GUIJavaFXで開く新世代GUI
JavaFXで開く新世代GUI
 
Links/Деловой и денежный мир
Links/Деловой и денежный мирLinks/Деловой и денежный мир
Links/Деловой и денежный мир
 
Ôn tập KTTMDT
Ôn tập KTTMDTÔn tập KTTMDT
Ôn tập KTTMDT
 
Система рендеринга в Magento
Система рендеринга в MagentoСистема рендеринга в Magento
Система рендеринга в Magento
 
Drupal Module Development
Drupal Module DevelopmentDrupal Module Development
Drupal Module Development
 
Drupal Development
Drupal DevelopmentDrupal Development
Drupal Development
 
Zepplin_Pronko_Magento_Festival Hall 1_Final
Zepplin_Pronko_Magento_Festival Hall 1_FinalZepplin_Pronko_Magento_Festival Hall 1_Final
Zepplin_Pronko_Magento_Festival Hall 1_Final
 
Presentation
PresentationPresentation
Presentation
 
Melody Designer Training
Melody Designer TrainingMelody Designer Training
Melody Designer Training
 

Similar a Magento20100313

Desenvolvimento web com Ruby on Rails (parte 2)
Desenvolvimento web com Ruby on Rails (parte 2)Desenvolvimento web com Ruby on Rails (parte 2)
Desenvolvimento web com Ruby on Rails (parte 2)
Joao Lucas Santana
 
jQtouch, Building Awesome Webapps
jQtouch, Building Awesome WebappsjQtouch, Building Awesome Webapps
jQtouch, Building Awesome Webapps
Home
 

Similar a Magento20100313 (20)

Magento20100226
Magento20100226Magento20100226
Magento20100226
 
Toutch Jquery Mobile
Toutch Jquery MobileToutch Jquery Mobile
Toutch Jquery Mobile
 
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
 
An Introduction to HTML5
An Introduction to HTML5An Introduction to HTML5
An Introduction to HTML5
 
Movable Type Seminar 2011
Movable Type Seminar 2011Movable Type Seminar 2011
Movable Type Seminar 2011
 
Attractive HTML5~開発者の視点から~
Attractive HTML5~開発者の視点から~Attractive HTML5~開発者の視点から~
Attractive HTML5~開発者の視点から~
 
Struts portlet-1
Struts portlet-1Struts portlet-1
Struts portlet-1
 
Bootstrap 3 in Joomla!
Bootstrap 3 in Joomla!Bootstrap 3 in Joomla!
Bootstrap 3 in Joomla!
 
Taking your Web App for a walk
Taking your Web App for a walkTaking your Web App for a walk
Taking your Web App for a walk
 
Desenvolvimento web com Ruby on Rails (parte 2)
Desenvolvimento web com Ruby on Rails (parte 2)Desenvolvimento web com Ruby on Rails (parte 2)
Desenvolvimento web com Ruby on Rails (parte 2)
 
iWebkit
iWebkitiWebkit
iWebkit
 
HTML 5 Fundamental
HTML 5 FundamentalHTML 5 Fundamental
HTML 5 Fundamental
 
Resource Registries: Plone Conference 2014
Resource Registries: Plone Conference 2014Resource Registries: Plone Conference 2014
Resource Registries: Plone Conference 2014
 
Creating a basic joomla
Creating a basic joomlaCreating a basic joomla
Creating a basic joomla
 
Jsf2.0 -4
Jsf2.0 -4Jsf2.0 -4
Jsf2.0 -4
 
jQtouch, Building Awesome Webapps
jQtouch, Building Awesome WebappsjQtouch, Building Awesome Webapps
jQtouch, Building Awesome Webapps
 
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJRealize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
 
Creating GUI container components in Angular and Web Components
Creating GUI container components in Angular and Web ComponentsCreating GUI container components in Angular and Web Components
Creating GUI container components in Angular and Web Components
 
Schoology tutorial[1]
Schoology tutorial[1]Schoology tutorial[1]
Schoology tutorial[1]
 
Joomla! Template for Beginners
Joomla! Template for BeginnersJoomla! Template for Beginners
Joomla! Template for Beginners
 

Más de Hirokazu Nishi

Magento cafe tokyo2~デザイナー向けMagentoの歩き方
Magento cafe tokyo2~デザイナー向けMagentoの歩き方Magento cafe tokyo2~デザイナー向けMagentoの歩き方
Magento cafe tokyo2~デザイナー向けMagentoの歩き方
Hirokazu Nishi
 
最新・Magentoを日本語で使うイロハ
最新・Magentoを日本語で使うイロハ最新・Magentoを日本語で使うイロハ
最新・Magentoを日本語で使うイロハ
Hirokazu Nishi
 
加速していくMagento 〜MDP2011参加レポート〜
加速していくMagento 〜MDP2011参加レポート〜加速していくMagento 〜MDP2011参加レポート〜
加速していくMagento 〜MDP2011参加レポート〜
Hirokazu Nishi
 

Más de Hirokazu Nishi (19)

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

Último

Último (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 

Magento20100313

  • 1. Magento 2010/03/13 Magento-JP User Group 2010 3 14
  • 2. • Magento • Twitter@hirokazu_nishi 2010 3 14
  • 3. Magento • Magento • XML • Block • • Tips 2010 3 14
  • 5. app code core community local design frontend adminhtml etc locale lib js javascript skin frontend adminhtml 2010 3 14
  • 6. 2010 3 14
  • 7. design frontend default default layout XML locale template foo bar 2010 3 14
  • 8. design frontend default default layout XML locale template foo bar 2010 3 14
  • 9. design frontend default default layout XML locale template foo bar 2010 3 14
  • 10. Magento 2010 3 14
  • 11. • • 2010 3 14
  • 13. <?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 3 14
  • 14. • if endif; • foreach endforeach; • $this->hogehoge • PHP 2010 3 14
  • 15. • XML 2010 3 14
  • 16. • page • • 2010 3 14
  • 17. XML 2010 3 14
  • 18. XML • XML • • • XML 2010 3 14
  • 19. 2010 3 14
  • 20. 2010 3 14
  • 21. XML 2010 3 14
  • 22. XML -Scalena News- 2010 3 14
  • 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 3 14
  • 24. block • reference • action • remove 2010 3 14
  • 25. block • • • <block type=”foo” name=”foo” template=”foo.phtml” /> 2010 3 14
  • 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 3 14
  • 27. reference • name=”foo” • <reference name=”foo”> 2010 3 14
  • 28. <?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 3 14
  • 29. action • block • block • • <action method=”foo”> </ action> 2010 3 14
  • 30. <?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 3 14
  • 31. remove • • <remove name=”foo”/> • 2010 3 14
  • 32. CMS • • • XML 2010 3 14
  • 33. Block 2010 3 14
  • 34. Block • XML block • .phtml • XML public • XML 2010 3 14
  • 35. Block <block type="foo/foo" name="foo.foo"> <block type="foo/bar" name="foo.bar" as="bar"/> </block> 2010 3 14
  • 37. Mage_Core_Model_Layout createBlock • core grep • XML 2010 3 14
  • 38. • CMS XML • • Free_CMS 2010 3 14
  • 39. • 1.3 {{block type=”cms/block” block_id=”hoge” template=”cms/content.phtml”}} • 1.4 {{widget type="cms/widget_block" template="cms/widget/static_block/ default.phtml" block_id="5"}} 2010 3 14
  • 40. • <block type=”cms/block” name=”hoge” (before|after)=”foo”> <action method=”setBlockId”> hoge </action> </block> 2010 3 14
  • 41. 2010 3 14
  • 42. HTML • JS CSS • 2010 3 14
  • 43. OK • • CSS JS 2010 3 14
  • 44. Tips 2010 3 14
  • 45. <remove name=”breadcrumbs” /> <reference name=”breadcrumbs”> <action method=”addCrumnb”> <label>home</label> <params> <label>home</label> <title> </title> <link>home</link> <first>true</first> </params> </action> <action method=”addCrumnb”> <label>foofoo</label> <params> <label> </label> <title> </title> <link/> <last>true</last> </params> </action> </reference> 2010 3 14
  • 46. <reference name=”top.links”> <action method=”addLink” translate=”label title” module=”customer”> <label> </label> <url>/hogehoge</url> <title> </title> <prepare/> <urlParams/> <position>90</position> </action> <action method=”addLink” translate=”label title” module=”customer”> <label> </label> <url>/fugefuge</url> <title> </title> <prepare/> <urlParams/> <position>100</position> </action> </reference> 2010 3 14
  • 47. 2010 3 14