SlideShare une entreprise Scribd logo
1  sur  39
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

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
 
Ôn tập KTTMDT
Ôn tập KTTMDTÔn tập KTTMDT
Ôn tập KTTMDT
mrcoffee282
 
Developing a Joomla 3.x Component using RAD FOF- Part 1: Back-end - Joomladay...
Developing a Joomla 3.x Component using RAD FOF- Part 1: Back-end - Joomladay...Developing a Joomla 3.x Component using RAD FOF- Part 1: Back-end - Joomladay...
Developing a Joomla 3.x Component using RAD FOF- Part 1: Back-end - Joomladay...
Peter Martin
 
Система рендеринга в 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
 

Tendances (20)

Profit statement 00
Profit statement 00Profit statement 00
Profit statement 00
 
Inchoo s magento posts
Inchoo s magento postsInchoo s magento posts
Inchoo s magento posts
 
Working with the django admin
Working with the django admin Working with the django admin
Working with the django admin
 
MTDDC Meetup TOKYO 2016
MTDDC Meetup TOKYO 2016MTDDC Meetup TOKYO 2016
MTDDC Meetup TOKYO 2016
 
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
 
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 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
 
JavaFXで開く新世代GUI
JavaFXで開く新世代GUIJavaFXで開く新世代GUI
JavaFXで開く新世代GUI
 
DJango admin interface
DJango admin interfaceDJango admin interface
DJango admin interface
 
Odoo Experience 2018 - From a Web Controller to a Full CMS
Odoo Experience 2018 - From a Web Controller to a Full CMSOdoo Experience 2018 - From a Web Controller to a Full CMS
Odoo Experience 2018 - From a Web Controller to a Full CMS
 
Odoo (Build module, Security, ORM)
Odoo (Build module, Security, ORM)Odoo (Build module, Security, ORM)
Odoo (Build module, Security, ORM)
 
Odoo Experience 2018 - The Odoo JS Framework
Odoo Experience 2018 - The Odoo JS FrameworkOdoo Experience 2018 - The Odoo JS Framework
Odoo Experience 2018 - The Odoo JS Framework
 
Links/Деловой и денежный мир
Links/Деловой и денежный мирLinks/Деловой и денежный мир
Links/Деловой и денежный мир
 
Ôn tập KTTMDT
Ôn tập KTTMDTÔn tập KTTMDT
Ôn tập KTTMDT
 
Developing a Joomla 3.x Component using RAD FOF- Part 1: Back-end - Joomladay...
Developing a Joomla 3.x Component using RAD FOF- Part 1: Back-end - Joomladay...Developing a Joomla 3.x Component using RAD FOF- Part 1: Back-end - Joomladay...
Developing a Joomla 3.x Component using RAD FOF- Part 1: Back-end - Joomladay...
 
Jsf lab
Jsf labJsf lab
Jsf lab
 
Система рендеринга в Magento
Система рендеринга в MagentoСистема рендеринга в Magento
Система рендеринга в Magento
 
Presentation
PresentationPresentation
Presentation
 
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
 
Drupal Development
Drupal DevelopmentDrupal Development
Drupal Development
 

Similaire à Magento20100226

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
 
HTML 5 Drupalcamp Ireland Dublin 2010
HTML 5 Drupalcamp Ireland Dublin 2010HTML 5 Drupalcamp Ireland Dublin 2010
HTML 5 Drupalcamp Ireland Dublin 2010
alanburke
 
HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2
James Pearce
 

Similaire à Magento20100226 (20)

Magento20100313
Magento20100313Magento20100313
Magento20100313
 
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
 
The Thinking behind BEM
The Thinking behind BEMThe Thinking behind BEM
The Thinking behind BEM
 
iWebkit
iWebkitiWebkit
iWebkit
 
Toutch Jquery Mobile
Toutch Jquery MobileToutch Jquery Mobile
Toutch Jquery Mobile
 
JQuery Mobile UI
JQuery Mobile UIJQuery Mobile UI
JQuery Mobile UI
 
HTML 5 Fundamental
HTML 5 FundamentalHTML 5 Fundamental
HTML 5 Fundamental
 
Nyss Open legislation
Nyss Open legislationNyss Open legislation
Nyss Open legislation
 
Xxx
XxxXxx
Xxx
 
Bootstrap
BootstrapBootstrap
Bootstrap
 
Developing a Joomla 3.x Component using RAD/FOF - Joomladay UK 2014
Developing a Joomla 3.x Component using RAD/FOF - Joomladay UK 2014Developing a Joomla 3.x Component using RAD/FOF - Joomladay UK 2014
Developing a Joomla 3.x Component using RAD/FOF - Joomladay UK 2014
 
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)
 
HTML 5 Drupalcamp Ireland Dublin 2010
HTML 5 Drupalcamp Ireland Dublin 2010HTML 5 Drupalcamp Ireland Dublin 2010
HTML 5 Drupalcamp Ireland Dublin 2010
 
Resource Registries: Plone Conference 2014
Resource Registries: Plone Conference 2014Resource Registries: Plone Conference 2014
Resource Registries: Plone Conference 2014
 
Liquibase migration for data bases
Liquibase migration for data basesLiquibase migration for data bases
Liquibase migration for data bases
 
Joomla! Template for Beginners
Joomla! Template for BeginnersJoomla! Template for Beginners
Joomla! Template for Beginners
 
HTML5
HTML5HTML5
HTML5
 
HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2
 
An Introduction to HTML5
An Introduction to HTML5An Introduction to HTML5
An Introduction to HTML5
 
Creating a basic joomla
Creating a basic joomlaCreating a basic joomla
Creating a basic joomla
 

Plus 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
 

Plus 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参加レポート〜
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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
 
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
 
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?
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 

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