Skip to content

Commit

Permalink
[FEATURE] Adjust Templates and TS to Site Package Tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
linawolf committed Dec 8, 2024
1 parent b941631 commit 3648812
Show file tree
Hide file tree
Showing 27 changed files with 252 additions and 205 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ mod {
rowCount = 1
rows {
1 {
columns {
1 {
name = LLL:EXT:{{ package.extensionKey }}/Resources/Private/Language/locallang_be.xlf:backend_layout.column.stage
colPos = 1
identifier = stage
slideMode = slide
}
}
}
2 {
columns {
1 {
name = LLL:EXT:{{ package.extensionKey }}/Resources/Private/Language/locallang_be.xlf:backend_layout.column.normal
Expand All @@ -23,7 +33,7 @@ mod {
}
}
}
icon = EXT:{{ package.extensionKey }}/Resources/Public/Icons/BackendLayouts/example.svg
icon = EXT:{{ package.extensionKey }}/Resources/Public/Icons/BackendLayouts/default.svg
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
mod {
web_layout {
BackendLayouts {
example {
title = LLL:EXT:{{ package.extensionKey }}/Resources/Private/Language/locallang_be.xlf:backend_layout.example
Subpage {
title = LLL:EXT:{{ package.extensionKey }}/Resources/Private/Language/locallang_be.xlf:backend_layout.subpage
config {
backend_layout {
colCount = 2
Expand All @@ -15,9 +15,10 @@ mod {
columns {
1 {
name = LLL:EXT:{{ package.extensionKey }}/Resources/Private/Language/locallang_be.xlf:backend_layout.column.stage
colPos = 0
identifier = stage
colPos = 1
colspan = 2
identifier = stage
slideMode = slide
}
}
}
Expand All @@ -31,15 +32,15 @@ mod {
2 {
name = LLL:EXT:{{ package.extensionKey }}/Resources/Private/Language/locallang_be.xlf:backend_layout.column.right
colPos = 2
identifier = right
slideMode = slide
identifier = sidebar
slideMode = collectReverse
}
}
}
}
}
}
icon = EXT:{{ package.extensionKey }}/Resources/Public/Icons/BackendLayouts/example.svg
icon = EXT:{{ package.extensionKey }}/Resources/Public/Icons/BackendLayouts/subpage.svg
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
page {
10 {
dataProcessing {
30 = menu
30 {
special = rootline
special.range = 0|-1
as = breadcrumb
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
page {
10 {
dataProcessing {
20 = menu
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Part 4: global site configuration
config {
# Adjust the title tag to be displayed as “website - page title”
pageTitleSeparator = -
pageTitleSeparator.noTrimWrap = | | |

# Display the Admin Panel at the bottom of pages to logged in backend users
admPanel = 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
page = PAGE
page {
10 = PAGEVIEW
10 {
paths {
0 = EXT:{{ package.extensionKey }}/Resources/Private/PageView/
10 = {${{ package.packageName }}.template_path}
}

dataProcessing {
# makes content elements available as {content} in Fluid template
10 = page-content
}
}
shortcutIcon = {${{ package.packageName }}.favicon}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
categories:
{{ package.packageName }}:
label: '{{ package.title }}'
{{ package.packageName }}.templates:
label: 'Templates'
parent: {{ package.packageName }}
{{ package.packageName }}.layout:
label: 'Layout'
parent: {{ package.packageName }}

settings:
{{ package.packageName }}.template_path:
label: 'Page template path'
category: {{ package.packageName }}.templates
description: 'Path to the templates of the {{ package.title }}.'
type: string
default: 'EXT:{{ package.extensionKey }}/Resources/Private/Templates/'

{{ package.packageName }}.logo:
label: 'Logo'
category: {{ package.packageName }}.layout
description: 'Path to the logo of {{ package.title }}.'
type: string
default: 'EXT:{{ package.extensionKey }}/Resources/Public/Images/logo.svg'

{{ package.packageName }}.logo-alt:
label: 'Logo Alt text'
category: {{ package.packageName }}.layout
description: 'Alternative text of the logo for the visually impaired'
type: string
default: 'Logo'

{{ package.packageName }}.favicon:
label: 'Favicon'
description: 'This icon is displayed in search engine results and in the browser tab'
category: {{ package.packageName }}.layout
type: string
default: 'EXT:{{ package.extensionKey }}/Resources/Public/Icons/favicon.ico'
Original file line number Diff line number Diff line change
@@ -1,28 +1,12 @@
styles:
templates:
layoutRootPath: 'EXT:{{ package.extensionKey }}/Resources/Private/ContentElements/Layouts/'
partialRootPath: 'EXT:{{ package.extensionKey }}/Resources/Private/ContentElements/Partials/'
templateRootPath: 'EXT:{{ package.extensionKey }}/Resources/Private/ContentElements/Templates/'

page:
pageview:
paths: 'EXT:{{ package.extensionKey }}/Resources/Private/PageView/'

meta:
viewport: 'width=device-width, initial-scale=1'
robots: 'index,follow'
apple-mobile-web-app-capable: 'no'
compatible: 'IE=edge'

tracking:
google:
trackingID: ''
anonymizeIp: '1'

config:
no_cache: '0'
removeDefaultJS: '0'
admPanel: '1'
prefixLocalAnchors: 'all'
headerComment: 'build by sitepackagebuilder.com'
sendCacheHeaders: '1'
templates:
layoutRootPath: EXT:{{ package.extensionKey }}/Resources/Private/ContentElements/Layouts
partialRootPath: EXT:{{ package.extensionKey }}/Resources/Private/ContentElements/Partials
templateRootPath: EXT:{{ package.extensionKey }}/Resources/Private/ContentElements/Templates
content:
textmedia:
maxW: 1200
maxWInText: 600
linkWrap:
lightboxEnabled: true
lightboxCssClass: lightbox
Original file line number Diff line number Diff line change
@@ -1,102 +1,2 @@
##############
#### PAGE ####
##############
page = PAGE
page {
typeNum = 0
shortcutIcon = EXT:{{ package.extensionKey }}/Resources/Public/Icons/favicon.ico

10 = PAGEVIEW
10 {
paths {
0 = EXT:{{ package.extensionKey }}/Resources/Private/PageView/
1 = {$page.pageview.paths}
}
dataProcessing {
10 = files
10 {
references.fieldName = media
}
20 = menu
20 {
levels = 2
includeSpacer = 1
as = mainnavigation
}
30 = page-content
}
}

meta {
viewport = {$page.meta.viewport}
robots = {$page.meta.robots}
apple-mobile-web-app-capable = {$page.meta.apple-mobile-web-app-capable}

X-UA-Compatible = {$page.meta.compatible}
X-UA-Compatible {
attribute = http-equiv
}
}

includeCSSLibs {

}

includeCSS {
{{ package.extensionKey }}_layout = EXT:{{ package.extensionKey }}/Resources/Public/Css/layout.css
}

includeJSLibs {

}

includeJS {

}

includeJSFooterlibs {

}

includeJSFooter {
{{ package.extensionKey }}_scripts = EXT:{{ package.extensionKey }}/Resources/Public/JavaScript/main.js
}
}


################
#### CONFIG ####
################
config {
absRefPrefix = auto
no_cache = {$config.no_cache}
uniqueLinkVars = 1
pageTitleFirst = 1
linkVars = L
prefixLocalAnchors = {$config.prefixLocalAnchors}
renderCharset = utf-8
metaCharset = utf-8
doctype = html5
removeDefaultJS = {$config.removeDefaultJS}
inlineStyle2TempFile = 1
admPanel = {$config.admPanel}
debug = 0
cache_period = 86400
sendCacheHeaders = {$config.sendCacheHeaders}
intTarget =
extTarget =
disablePrefixComment = 1
index_enable = 1
index_externals = 1
index_metatags = 1
headerComment = {$config.headerComment}

// Disable Image Upscaling
noScaleUp = 1

// Compression and Concatenation of CSS and JS Files
compressJs = 0
compressCss = 0
concatenateJs = 0
concatenateCss = 0
}
@import './TypoScript/*.typoscript'
@import './TypoScript/Navigation/*.typoscript'
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ languages:
navigationTitle: English
flag: us
rootPageId: 1
websiteTitle: 'Example site'
websiteTitle: '{{ package.title }}'
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<trans-unit id="backend_layout.default">
<source>Default</source>
</trans-unit>
<trans-unit id="backend_layout.subpage">
<source>Subpage</source>
</trans-unit>
<trans-unit id="backend_layout.column.stage">
<source>Stage</source>
</trans-unit>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<f:asset.css identifier="bootstrap" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" />
<f:asset.css identifier="main" href="EXT:{{ package.extensionKey }}/Resources/Public/Css/main.css" />
<main>
<f:render partial="Header" arguments="{_all}"/>
<f:render section="Main"/>
<f:render partial="Footer" arguments="{_all}"/>
</main>
<f:asset.script identifier="bootstrap" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" />
<f:asset.script identifier="main" src="EXT:{{ package.extensionKey }}/Resources/Public/JavaScript/main.js" />
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
<f:layout name="Default" />
<f:layout name="PageLayout"/>
<f:section name="Main">

<div style="background-color: yellow; padding: 0.5em 1em;">
<dl>
<dt>Template file</dt>
<dd>
<code>packages/{{ package.extensionKey }}/Resources/Private/PageView/Pages/Default.html</code>
</dd>
<dt>Backend Configuration</dt>
<dd>
<code>packages/{{ package.extensionKey }}/Configuration/Sets/SitePackage/PageTsConfig/BackendLayouts/default.tsconfig</code>
</dd>
</dl>
</div>
<f:render partial="Stage" arguments="{_all}"/>

<f:render partial="Content" arguments="{records: content.main.records}"/>
<div class="container">
<f:render partial="Content" arguments="{records: content.main.records}"/>
</div>

</f:section>
Loading

0 comments on commit 3648812

Please sign in to comment.