Skip to content

Instantly share code, notes, and snippets.

@sbruggmann
Last active December 19, 2015 05:04
Show Gist options
  • Save sbruggmann/1d4e7641305d8fe1514b to your computer and use it in GitHub Desktop.
Save sbruggmann/1d4e7641305d8fe1514b to your computer and use it in GitHub Desktop.
TYPO3 Neos OnePager
<!DOCTYPE html>
{namespace neos=TYPO3\Neos\ViewHelpers}
{namespace ts=TYPO3\TypoScript\ViewHelpers}
<html>
<head>
<!-- take from Default.html test teest -->
</head>
<body>
<f:section name="body">
<div class="container">
<div class="row">
<div class="col-dm-12">
<nav class="menu">
{parts.menu -> f:format.raw()}
</nav>
</div>
</div>
<div class="row">
<div class="col-dm-12">
<nav class="breadcrumb">
{parts.breadcrumb -> f:format.raw()}
</nav>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="content">
{content.main -> f:format.raw()}
</div>
</div>
</div>
</div>
<hr>
<f:for each="{items}" as="item" iteration="itemIterator">
<f:if condition="{item.properties.title}">
<f:then>
<ts:render path="childContent" context="{node: item}" />
<div class="container">
<div class="row">
<div class="col-md-12">
<neos:link.node node="{item}" title="{item.properties.title}" class="btn btn-default">
more "{item.properties.title}"
</neos:link.node>
</div>
</div>
</div>
<hr>
</f:then>
</f:if>
</f:for>
</f:section>
<f:section name="bodyScripts">
<!-- Put your scripts inclusions for the end of the body here, they will be included in your website by TypoScript -->
</f:section>
</body>
</html>
##
# "OnePager" Home Template
#
prototype(WE.WebExcessCh:OnePager) < prototype(WE.WebExcessCh:Page) {
body {
templatePath = 'resource://WE.WebExcessCh/Private/Templates/Page/OnePager.html'
sectionName = 'body'
parts {
menu = Menu
breadcrumb = Breadcrumb
}
items = ${q(node).find('[instanceof WE.WebExcessCh:OnePagerPage]')}
childContent = TYPO3.Neos:ContentCollection {
nodePath = 'main'
}
// These are your content areas, you can define as many as you want, just name them and the nodePath.
content {
// The default content section
main = PrimaryContent {
nodePath = 'main'
}
}
}
}
<!DOCTYPE html>
{namespace neos=TYPO3\Neos\ViewHelpers}
{namespace media=TYPO3\Media\ViewHelpers}
{namespace ts=TYPO3\TypoScript\ViewHelpers}
<html>
<head>
<!-- take from Default.html -->
</head>
<body>
<f:section name="body">
<f:if condition="{parts.parallax}">
<div data-image="{media:uri.image(image:parts.parallax)}" data-width="1900" data-height="1076" class="full-width slider hidden-xs img-holder"></div>
</f:if>
<nav class="menu">
{parts.menu -> f:format.raw()}
</nav>
<nav class="breadcrumb">
{parts.breadcrumb -> f:format.raw()}
</nav>
<div class="content">
<f:if condition="{node.context.workspace.name} != 'live'">
<div style="background-color: rgba(91, 192, 222, .5); position: relative; margin-bottom: 20px;">
<span style="position: absolute; top: -14px; left: 5px;" class="label label-info">Teaser-Content</span>
</f:if>
{content.main -> f:format.raw()}
<f:if condition="{node.context.workspace.name} != 'live'">
</div>
</f:if>
</div>
<div class="more-content">
<f:if condition="{node.context.workspace.name} != 'live'">
<div style="background-color: rgba(91, 192, 222, .5); position: relative; margin-bottom: 20px;">
<span style="position: absolute; top: -14px; left: 5px;" class="label label-info">Main-Content</span>
</f:if>
{content.more -> f:format.raw()}
<f:if condition="{node.context.workspace.name} != 'live'">
</div>
</f:if>
</div>
</f:section>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment