Skip to content

Instantly share code, notes, and snippets.

@lneugebauer
Last active October 25, 2022 13:48
Show Gist options
  • Save lneugebauer/3ce8807cfae0f8ac5310ddc78f61cd37 to your computer and use it in GitHub Desktop.
Save lneugebauer/3ce8807cfae0f8ac5310ddc78f61cd37 to your computer and use it in GitHub Desktop.
TYPO3 Fluid User Snippets for Visual Studio Code
{
"Fluid Debug": {
"prefix": "fDebug",
"body": "<f:debug${2: title=\"$3\"}>$TM_SELECTED_TEXT$1</f:debug>$0"
},
"Fluid Debug Inline": {
"prefix": "fDebugInline",
"body": "${1:-> }f:debug(${2:title: '$3'})$0"
},
"Fluid If": {
"prefix": "fIf",
"body": "<f:if condition=\"$1\">$2</f:if>$0"
},
"Fluid If Inline": {
"prefix": "fIfInline",
"body": "{f:if(condition: '$1', then: '$2'${3: else: '$4'})}$0"
},
"Fluid If-Else": {
"prefix": "fIfElse",
"body": [
"<f:if condition=\"$1\">",
" <f:then>$2</f:then>",
" <f:else>$3</f:else>",
"</f:if>$0"
]
},
"Fluid For-Each Loop": {
"prefix": "fFor",
"body": "<f:for each=\"$1\" as=\"$2\">$3</f:for>$0"
},
"Fluid Switch": {
"prefix": "fSwitch",
"body": [
"<f:switch expression=\"{$1}\">",
" <f:case value=\"$2\">$3</f:case>",
" <f:defaultCase>$4</f:defaultCase>",
"</f:switch>$0"
]
},
"Fluid Format HMTL": {
"prefix": "fFormatHtml",
"body": "<f:format.html>$TM_SELECTED_TEXT$1</f:format.html>$0"
},
"Fluid Format HTML Inline": {
"prefix": "fFormatHtmlInline",
"body": "${1:-> }f:format.html()${2:\\}}$0"
},
"Fluid Format Raw": {
"prefix": "fFormatRaw",
"body": "<f:format.raw>$TM_SELECTED_TEXT$1</f:format.raw>$0"
},
"Fluid Format Raw Inline": {
"prefix": "fFormatRawInline",
"body": "${1:-> }f:format.raw()${2:\\}}$0"
},
"Fluid Typolink": {
"prefix": "fLinkTypolink",
"body": "<f:link.typolink parameter=\"$1\"${3:${4: target=\"_blank\"}${5: class=\"$6\"}${7: absolute=\"1\"}${8: parts-as=\"part\"}}>$2</f:link.typolink>$0"
},
"Fluid Asset Script": {
"prefix": "fAssetScript",
"body": "<f:asset.script identifier=\"$1\" src=\"$2\"${3: async=\"1\"}${4: defer=\"1\"} />$0"
},
"Fluid Image": {
"prefix": "fImage",
"body": "<f:image ${1|image,src|}=\"$2\" />$0"
},
"Fluid Comment": {
"prefix": "fComment",
"body": [
"<f:comment><![CDATA[",
" $TM_SELECTED_TEXT$1",
"]]></f:comment>$0"
]
},
"Fluid Render": {
"prefix": "fRender",
"body": "<f:render ${1|partial,section|}=\"$2\" ${3:arguments=\"{$4\\}\"} />$0"
},
"Fluid Section": {
"prefix": "fSection",
"body": "<f:section name=\"$1\">$2</f:section>$0"
},
"Fluid Email Link": {
"prefix": "fLinkEmail",
"body": "<f:link.email email=\"$1\" />$0"
},
"Fluid Translate Key": {
"prefix": "fTranslateKey",
"body": "<f:translate key=\"LLL:EXT:$1\" />$0"
},
"Fluid External Link": {
"prefix": "fLinkExternal",
"body": "<f:link.external uri=\"$1\"${3:${4: target=\"_blank\"}${5: class=\"$6\"}${7: absolute=\"1\"}}>$2</f:link.external>$0"
},
"Fluid Action Link": {
"prefix": "fLinkAction",
"body": "<f:link.action action=\"$1\"${3:${4: controller=\"$5\"}${6: extensionName=\"$7\"}${8: pluginName=\"$9\"}${10: arguments=\"$11\"}${12: class=\"$13\"}}>$2</f:link.action>$0"
},
"Fluid Variable": {
"prefix": "fVariable",
"body": "<f:variable name=\"$1\">$2</f:variable>$0"
},
"Fluid Spaceless": {
"prefix": "fSpaceless",
"body": "<f:spaceless>$TM_SELECTED_TEXT$1</f:spaceless>$0"
},
"Fluid cObject": {
"prefix": "fCObject",
"body": "<f:cObject typoscriptObjectPath=\"$1\" ${2:data=\"{$3\\}\"} />$0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment