typo3camp mallorca: "introducing supafly"

17
Moin! Moin! Moin! 14-16.09.2012

Upload: sitegeistsvensson

Post on 27-Jun-2015

202 views

Category:

Technology


1 download

DESCRIPTION

Here are the slides of my session "Introducing SupaFly" given on Saturday, Sep 15 at the TYPO3camp Mallorca 2012.

TRANSCRIPT

Page 1: TYPO3camp Mallorca: "Introducing supafly"

Moin!Moin!Moin!

14-16.09.2012

Page 2: TYPO3camp Mallorca: "Introducing supafly"

Introducing SupaFly®

The beginning ofa very specialfriendship

Page 3: TYPO3camp Mallorca: "Introducing supafly"

Let‘s have a look into the

past..

Page 4: TYPO3camp Mallorca: "Introducing supafly"

DHTML-Menus are ancient history

Page 5: TYPO3camp Mallorca: "Introducing supafly"

„OTTO“-Menus are also history

Page 6: TYPO3camp Mallorca: "Introducing supafly"

It‘s time forSupaFly!

Page 7: TYPO3camp Mallorca: "Introducing supafly"
Page 8: TYPO3camp Mallorca: "Introducing supafly"

And wtf do we need this?Users don‘t like to click

They like to see what they get – before the decide where to click

Not every section of a website has the same depth or a homogene structure

Click paths should be short and transparent

Better user experience

Tablets first!

Page 9: TYPO3camp Mallorca: "Introducing supafly"

Features of SupaFly®

Very flexible, e.g. 3, 4 or 5 columns

Can contain any kind of CE, e.g. text/image, sitemap or plugin (form, maps, ..)

Fully controllable through editors

Easy to implement

Based on Backend-Layouts and TypoScript

No TemplaVoila needed

Page 10: TYPO3camp Mallorca: "Introducing supafly"

Getting started…Create different Backend-Layouts for each Flyout-type (3-col, 4-col, …)

To avoid conflicts with rendering of default content cols (normal, left, right, ..) set colPos value up to … 100 +

Linking Backend-Layouts with your section pages (Tab „Appearance“)

Page-type „shortcut“ is the best

Ready for content!

Page 11: TYPO3camp Mallorca: "Introducing supafly"

Bringing it all together…Preparing the HTML-Template

Extending HMENU and other TS

Building SupaFly-Object (COA)

Some CSS-Styling

http://mallorca.cmstypo3.de

Page 12: TYPO3camp Mallorca: "Introducing supafly"

Feel free to contact me!sitegeist media solutions GmbH

Sven HuppachLeiter Qualitätsmanagement

[email protected]

Please have a look at the code snippetson the next pages.. :)

Page 13: TYPO3camp Mallorca: "Introducing supafly"

########## Just another 5-col BE-Layoutbackend_layout {

colCount = 5rowCount = 2rows {

1 {columns {

1 {name = SUPAFLY 1 (15)colPos = 109

}2 {

name = SUPAFLY 2 (15)colPos = 110

}3 {

name = SUPAFLY 3 (40)colPos = 111

}4 {

name = SUPAFLY 4 (15)colPos = 112

}5 {

name = SUPAFLY 5 (15)colPos = 113

}}

}2 {

columns {1 {

name = CONTENTcolspan = 5colPos = 0

}}

}}

}

TypoScript

Page 14: TYPO3camp Mallorca: "Introducing supafly"

########## Extending HMENUafter.cObject < lib.SupaFlyafterWrap = <div class="holder">|<span class="close"><!-- --></span></div>doNotLinkIt = 1

########## Adding SupaFly Layer to the corresponding pagetmp.getContent = CONTENTtmp.getContent { table = tt_content select { pidInList.field = uid orderBy = sorting languageField = sys_language_uid } stdWrap.required = 1 stdWrap.wrap =<div class="default">|</div>}

TypoScript

Page 15: TYPO3camp Mallorca: "Introducing supafly"

########## Get contents depending on chosen backend-layoutlib.SupaFly = COAlib.SupaFly { # Beginning at colPos 100 # 0-99 preserved for standard content columns # 2 cols / formatting 100 < tmp.getContent 100.select.where = colPos=100 100.stdWrap.wrap = <div class="grid_6">|</div> 101 < tmp.getContent 101.select.where = colPos=101 101.stdWrap.wrap = <div class="grid_6">|</div> # 3 cols / formatting 102 < tmp.getContent 102.select.where = colPos=102 102.stdWrap.wrap = <div class="grid_4">|</div> 103 < tmp.getContent 103.select.where = colPos=103 103.stdWrap.wrap = <div class="grid_4">|</div> 104 < tmp.getContent 104.select.where = colPos=104 104.stdWrap.wrap = <div class="grid_4">|</div> ... # 5 cols / formatting 109 < tmp.getContent 109.select.where = colPos=109 109.stdWrap.wrap = <div class="grid_2">|</div> 110 < tmp.getContent 110.select.where = colPos=110 110.stdWrap.wrap = <div class="grid_2">|</div> 111 < tmp.getContent 111.select.where = colPos=111 111.stdWrap.wrap = <div class="grid_4">|</div> 112 < tmp.getContent 112.select.where = colPos=112 112.stdWrap.wrap = <div class="grid_2">|</div> 113 < tmp.getContent 113.select.where = colPos=113 113.stdWrap.wrap = <div class="grid_2">|</div> }

TypoScript

Page 16: TYPO3camp Mallorca: "Introducing supafly"

/* supafly----------------------------------------------- */ul#mainnav li.tab { color:#fff; background:#666; font-weight:bold; text-decoration:none; display:block; float:left; padding:0 1em; height:2.4em; line-height:2.5em;}ul#mainnav li.tab:hover,ul#mainnav li.tab.sms_act { background: #fff; color: #666;}ul#mainnav li div.holder { border-top: none; left: -9999px; margin: 0px 0 0; color: #444; font-weight: normal; padding: 15px 0 10px 0; position: absolute; line-height: 150%; top: 33px; z-index: 10; background: #ffffff; -webkit-box-shadow: 0 3px 5px #666; -moz-box-shadow: 0 3px 5px #666; box-shadow: 0 3px 5px #666;}ul#mainnav li:hover div.holder, ul#mainnav li a:hover div.holder { left: 0px;}ul#mainnav li div.holder.act { left: 0px;}...

CSS

Page 17: TYPO3camp Mallorca: "Introducing supafly"

// Set all boxes to the same height // including jQuery required :)

var max_height = 0;$('.csc-frame-frame1').each(function(e) { h = $(this).height(); if(typeof(h) != "undefined") { if(h > max_height) { max_height = h; } }});if(max_height > 0) { $('.csc-frame-frame1').height(max_height);}

// SupaFly open and close for tablets$('#mainnav .tab').mouseenter(function(){ $('#mainnav .holder').css('left', '');});$('#mainnav .close').click(function(){ $('#mainnav .holder').css('left', '-9999px');});

JS