Inserting YAG plugins via TypoScript

Let's say you have a home page within your website on which you want to show some of your photos within a javascript slider. Of course you are using your favorite CMS TYPO3 and YAG gallery as photo gallery extension.

For the example below, Nivo Slider from yag_themepack_jquery extension is used. If you want to use this slider, make sure to have this extension installed on your system! 

Make sure you have included [yag] Yet Another Gallery (yag) AND [yag] Themepack jQuery (yag_themepack_jquery) static template on the page you want to insert the content element!

So here is how you can include any YAG plugin on your website via TypoScript:

###########################
# Including Nivo slider
###########################

plugin.tx_yag.HeaderSlider {

    albumHeaderSlider = USER
    albumHeaderSlider {
        userFunc = tx_extbase_core_bootstrap->run
        pluginName = Pi1
        extensionName = Yag
        # You can use any controller here (Album, ItemList, Gallery)
        controller = Album
        # Take a look inside your controllers for what actions are available
        action = showSingle
        switchableControllerActions {
             Album {
                1 = showSingle
            }
        }
        settings =< plugin.tx_yag.settings
        # Set UID of whatever album you want to include
        # For selecting a gallery (together with controller/action pair above) use settings.context.selectedGalleryUid
        # For selecting a single image (together with controller/action pair above) use settings.context.selectedItemUid
        settings.context.selectedAlbumUid = 139
        persistence =< plugin.tx_yag.persistence
        view =< plugin.tx_yag.view
    }
}

# Make sure to have your yag_themepack_jquery extension installed and running!
plugin.tx_yag.HeaderSlider.albumHeaderSlider.settings.theme = nivoSlider

# You can also use any lib-Path for including yag plugins on a TemplaVoila-driven site!
page.10.marks.IMGHEADER < plugin.tx_yag.HeaderSlider.albumHeaderSlider

Just to make this blogpost complete, I have to admit, that Daniel came up with this solution and I wrote it down as he was to busy to do it himself... so the credits for this one go to Daniel!


 
Inhalt © Michael Knoll 2009-2017  •  Powered by TYPO3  •  TypoScript Blogging by Fabrizio Branca  •  TYPO3 Photo Gallery Management by yag  •  Impressum