Skip to content

Instantly share code, notes, and snippets.

@oliverthiele
Created March 12, 2017 16:07
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oliverthiele/7668e4ae9739ceaa231618a6904446ca to your computer and use it in GitHub Desktop.
Save oliverthiele/7668e4ae9739ceaa231618a6904446ca to your computer and use it in GitHub Desktop.
Some of my favorite Live-Templates for PhpStorm
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="http://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
{namespace b=OliverThiele\OtBootstrap3\ViewHelpers}
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:spaceless>
$END$
<f:render section="Content" />
</f:spaceless>
</html>
{namespace b=OliverThiele\OtBootstrap3\ViewHelpers}
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<head>
<meta charset="utf-8">
<title>Partial: $TITLE$</title>
</head>
<body>
<f:section name="Main">
$END$
</f:section>
</body>
</html>
{namespace b=OliverThiele\OtBootstrap3\ViewHelpers}
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<head>
<meta charset="utf-8">
<title>Template: $TITLE$</title>
</head>
<body>
<f:layout name="Default" />
<f:section name="Content">
$END$
</f:section>
</body>
</html>
<f:comment>
<![CDATA[
<!--
$SELECTION$
-->
]]>
</f:comment>
/**
* TypoScript in EXT:$SELECTION$
*
* File: $File$
* Author: $Author$
* File created: $CreateDate$
*/
page = PAGE
page {
10 = FLUIDTEMPLATE
10 {
template.data = pagelayout
templateRootPaths {
0 = EXT:$ExtKey$/Resources/Private/Templates/
}
layoutRootPaths {
0 = EXT:$ExtKey$/Resources/Private/Layouts/
}
partialRootPaths {
0 = EXT:$ExtKey$/Resources/Private/Partials/
}
variables {
$END$
}
}
}
@oliverthiele
Copy link
Author

Settings in PhpStorm

Configuration of variables:

Name Expression Default value Skip if defined
TITLE fileNameWithoutExtension()
File fileName(sFileName)
Author user()
CreateDate date()
ExtKey snakeCase(String)

Additional Settings

  • Applicable in Other
  • Reformat according to style: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment