5.2 Working with Fluid

Beschreibung

TYPO3 CD 2020 (zweite Auflage) Quiz am 5.2 Working with Fluid, erstellt von Pascal Bartl am 09/04/2021.
Pascal Bartl
Quiz von Pascal Bartl, aktualisiert more than 1 year ago
Pascal Bartl
Erstellt von Pascal Bartl vor mehr als 3 Jahre
5
0

Zusammenfassung der Ressource

Frage 1

Frage
If {object.property} is used in Fluid, how must the domain model method be named to determine the value? (3)
Antworten
  • property()
  • getProperty()
  • isProperty()
  • hasProperty()
  • returnProperty()

Frage 2

Frage
How can a single template in a third-party extension be customised without copying all other templates from this extension? (1)
Antworten
  • This is not possible - all template files must be copied
  • By utilising the TypoScript setting templateRootPath
  • By utilising the TypoScript setting templateRootPaths
  • By utilising the method $this->setTemplatePath in the controller
  • By configuring the appropriate TypoScript constants

Frage 3

Frage
What is required in an Extbase controller to use the default view for a list action? (2)
Antworten
  • A method with the name list() must exist
  • A method with the name listAction() must exist
  • A method with the name initializeListAction() must exist
  • The method must not return any value
  • The method must return a value by using return at the end of the method

Frage 4

Frage
Replace ??? in the code snippet below, so that the template can be rendered in any PHP file. (1) $view = ??? $view->setTemplatePathAndFilename($templatepath); $view->assign('foo', 'bar'); $content = $view->render();
Antworten
  • new \TYPO3\Fluid\View();
  • new \TYPO3\Fluid\View\View();
  • new \TYPO3\Fluid\View\StandaloneView();
  • import \TYPO3\Fluid\View\StandaloneView();
  • import \TYPO3\Fluid();

Frage 5

Frage
How can a variable var (set in the controller) be passed to a partial? (2)
Antworten
  • <f:render partial="part" arguments="var" />
  • <f:render partial="part" arguments="{var}" />
  • <f:render partial="part" arguments="{var: var}" />
  • <f:render partial="part" arguments="{0: _all}" />
  • <f:render partial="part" arguments="{_all}" />

Frage 6

Frage
How can multiple variables be passed to the view? (3)
Antworten
  • By using $this->view->assignMultiple()
  • By using $this->view->assign() multiple times
  • By setting $this->view->setMultiple(true)
  • By setting $this->view->assignMultiple(true)
  • By using an array in the method call $this->view->assign()

Frage 7

Frage
What is the meaning of the optional attribute in the following code? (1) <f:render partial="list" section="content" optional="true" arguments="{blog:blog}" />
Antworten
  • If blog does not exist, argument “blog” will not be passed to the partial
  • The section can also be named content_1, content_2, etc.
  • If the partial does not exist, no error appears
  • The output is optional – this means if the partial is empty, nothing is displayed
  • If the section does not exist, no error appears

Frage 8

Frage
How can the rendering of the <html> tag in the following partial be prevented? (1) <html xmlns:f="https://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:n="https://ty\ po3.org/ns/GeorgRinger/News/ViewHelpers"> <f:if condition="{newsItem.title}"> <f:then> <n:titleTag>{newsItem.title}</n:titleTag> </f:then> <f:else> <n:titleTag>News Detail</n:titleTag> </f:else> </f:if> </html>
Antworten
  • This is not possible – Fluid always renders the entire HTML document
  • By utilising layouts
  • By setting the TypoScript option render.html = false
  • By setting the data-namespace-typo3-fluid attribute in the <html>-tag
  • Using the <f:comment> ViewHelper is the only option to prevent the rendering

Frage 9

Frage
Which of the following inline syntax is correct? (1)
Antworten
  • {f:if{condition:'{salutation}==1',then:'Mr',else:'Ms'}}
  • {f:if(condition:'{salutation}==1',then:'Mr',else:'Ms')}
  • {f:if(condition:'(salutation)==1',then:'Mr',else:'Ms')}
  • {f:if(condition:{salutation}==1,then:'Mr',else:'Ms')}
  • {f:if(condition:salutation==1,then:'Mr',else:'Ms')}
Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

Grundlagen der Online-Zusammenarbeit
Dozent
Einführung in die BWL: Kapitel 1
Anjay
Sturm und Drang & Empfindsamkeit
Julia Schaffhirt
Fachbegriffe für den Sprachunterricht
Stefan Kurtenbach
Fahrtheorie
malimi something
Lernplan Analysis
Hanna Marie Hock
Machst du auch diese 10 typischen Fehler auf Deutsch?
Dilyana Hunley
GPSY ALPS
Malte Ni
THEO: VO PSYCH - Medienpsychologie
Adrienne Tschaudi
Vetie Pathohisto 2019
Kristin E
Vetie: Berufsrecht Altfragen 2013-2017 Teil 2
Johanna Tr