[TYPO3-german] [YAG] dynamische AlbumAnsicht per Typoscript einbinden

Till Kleisli till.kleisli at unic.com
Thu Oct 20 16:14:03 CEST 2016


Hallo

Ich würde gerne tx_news so erweitern, dass über ein Eingabefeld ein Album ausgewählt werden kann. Den Typoscript-Code habe ich auch schon mit hardcedodeter AlbumUid funktionierend zusammen, ich scheitere aber daran, die AlbumUid dynamisch aus dem data-Attribut des cObject-Viewhelpers einzufügen.
<f:cObject typoscriptObjectPath="lib.yagAlbumView" data="2" />

Bereits versucht:
selectedAlbumUid.value.current = 1
-> Das wird immer als uid=1 interpretiert, egal, was als data übergeben wird

selectedAlbumUid = TEXT
selectedAlbumUid.value.current = 1
-> hier wird der String "TEXT" als uid genommen

selectedAlbumUid = {field: uid}
selectedAlbumUid.insertData = 1
mit data="{uid: 2}"
-> hier wird der String "{field: uid}" als uid genommen

Vielen Dank für weitere Hinweise.

Liebe Grüsse
Till


Mein Typoscript-Code:

lib.yagAlbumView = USER
lib.yagAlbumView {
        userFunc = TYPO3\CMS\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
        settings.theme = lightbox
        # 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{
            selectedPid = 221
            selectedAlbumUid = 2
        }

        mvc =< plugin.tx_yag.mvc
        view =< plugin.tx_yag.view
}


More information about the TYPO3-german mailing list