A presentation at Meet Magento 2011 in in Ede, Netherlands by Hans Kuijpers
set the basics right for better templating http://www.flickr.com/photos/unloveable/2396019222 Thursday 19 May 2011 (wk )
boring stuff first http://www.flickr.com/photos/swiv/5719738832 Thursday 19 May 2011 (wk )
endless possibilities Thursday 19 May 2011 (wk )
temporary design change Thursday 19 May 2011 (wk )
set your theme based on default Magento Thursday 19 May 2011 (wk )
first fallback set your theme based on default Modern Thursday 19 May 2011 (wk )
does file exist in package_name/ yes theme_name/ How stuff works Magento fall-back logic no does file exist in package_name/ yes display default/ no does file exist in base/ yes default/ no Thursday 19 May 2011 (wk ) rendering error
an existing theme http://www.flickr.com/photos/popilop/331357312 Thursday 19 May 2011 (wk )
create your own Page generation xml instructions for each module app/design/frontend/default/yourtheme/layout app/design/frontend/default/yourtheme/template Content block .phtml files for each module skin/frontend/default/yourtheme/css skin/frontend/default/yourtheme/images Visual layout info and files & UI-specific Javascript Thursday 19 May 2011 (wk )
a well coded theme should have to following traits • a single layout file, named local.xml, where all layout updates are placed. • no layout files with the same name as any layout file in the base theme • no css files with the same name as any css file in the default skin create local.css • no .phtml template files, except for those that were modified to support the new theme. usually this number will be very small Thursday 19 May 2011 (wk )
Remove callouts and rarely used stuff Add the local stylesheet your theme starts with local.xml Thursday 19 May 2011 (wk )
not much is changed Thursday 19 May 2011 (wk )
earn money with adsense http://www.flickr.com/photos/playerdue/5285272605/ Thursday 19 May 2011 (wk )
Thursday 19 May 2011 (wk )
http://www.adsense-generator.com Thursday 19 May 2011 (wk )
set both to yes scroll down to Developer Thursday 19 May 2011 (wk )
referral to catalog.xml Thursday 19 May 2011 (wk )
almost every time the same .xml referral to catalog.xml Thursday 19 May 2011 (wk )
this is base/default/layout/catalog.xml only copy this handle to local.xml Thursday 19 May 2011 (wk ) don’t edit this file
only change what needs to be changed call for your adsense script Thursday 19 May 2011 (wk )
newly created file in newly created directory in yourtheme create your .phtml file Thursday 19 May 2011 (wk )
and you’re done Thursday 19 May 2011 (wk )
timesaver http://www.flickr.com/photos/maigh/2141921845 Thursday 19 May 2011 (wk )
Magento backend goto System >> Configuration goto Developer change Scope expand Debug set Template Path Hints to Yes save Config (clean Cache) Magento frontend refresh page Thursday 19 May 2011 (wk )
Magento backend goto System >> Configuration goto Developer change Scope expand Debug set Template Path Hints to No save Config (clean Cache) Magento frontend refresh page Thursday 19 May 2011 (wk )
http://bit.ly/DeveloperToolbar Thursday 19 May 2011 (wk )
find the extension key use it to install done I’m a UNIX geek fond of SSH Thursday 19 May 2011 (wk )
enabled by default scroll down to Developer Thursday 19 May 2011 (wk )
click and go Thursday 19 May 2011 (wk )
click and go Thursday 19 May 2011 (wk )
from the book: “I always get my sin” a child can do the laundry Thursday 19 May 2011 (wk )
add more four ways to add a link http://www.flickr.com/photos/farruska/208926935 Thursday 19 May 2011 (wk )
Thursday 19 May 2011 (wk )
do not forget to activate Thursday 19 May 2011 (wk )
Thursday 19 May 2011 (wk )
http://www.flickr.com/photos/andrec/2893549851 Thursday 19 May 2011 (wk )
Thursday 19 May 2011 (wk )
a call for a template file app/design/frontend/base/layout/catalog.xml Thursday 19 May 2011 (wk )
URL key from CMS page app/design/frontend/default/yourtheme/ template/catalog/navigation/top.phtml Thursday 19 May 2011 (wk )
DONE!! Thursday 19 May 2011 (wk )
http://www.flickr.com/photos/boklm/486678763 Thursday 19 May 2011 (wk )
Thursday 19 May 2011 (wk )
call for static block in backend app/design/frontend/default/yourtheme/ template/catalog/navigation/top.phtml Thursday 19 May 2011 (wk )
create new static block Thursday 19 May 2011 (wk )
{{store direct_url=”loremipsum”}} Thursday 19 May 2011 (wk )
http://www.flickr.com/photos/boklm/486646798 Thursday 19 May 2011 (wk )
Thursday 19 May 2011 (wk )
no call for a template file app/design/frontend/base/layout/page.xml Thursday 19 May 2011 (wk )
URL key from CMS page app/design/frontend/default/yourtheme/ layout/local.xml Thursday 19 May 2011 (wk )
DONE!! Thursday 19 May 2011 (wk )
http://www.flickr.com/photos/boklm/486676439 Thursday 19 May 2011 (wk )
Thursday 19 May 2011 (wk )
Thursday 19 May 2011 (wk )
Thursday 19 May 2011 (wk )
Thursday 19 May 2011 (wk )
Thursday 19 May 2011 (wk )
Thursday 19 May 2011 (wk )
see you at Magento Competence Center magento-competence-center.com hans2103 yireo jiraict http://slideshare.net/hans2103 http://www.flickr.com/photos/trasimac/1217071176 Thursday 19 May 2011 (wk )
Magento templating explained during MeetMagento.nl 2011 Do not duplicate an existing theme!