Skip to content

Instantly share code, notes, and snippets.

View haassie's full-sized avatar

Richard Haeser haassie

View GitHub Profile
@haassie
haassie / Index.xml
Created December 7, 2018 15:12
Overriding XML sitemap styling in TYPO3
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="{f:uri.resource(path: 'CSS/Sitemap.xsl', extensionName: 'demo_extension')}"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<f:for each="{sitemaps}" as="sitemap">
<sitemap>
<f:spaceless>
<f:if condition="{sitemap.page}">
<f:then><loc><f:uri.page pageType="{type}" additionalParams="{sitemap: sitemap.key, page: sitemap.page}" absolute="true" noCacheHash="false" /></loc></f:then>
<f:else><loc><f:uri.page pageType="{type}" additionalParams="{sitemap: sitemap.key}" absolute="true" noCacheHash="false" /></loc></f:else>
@haassie
haassie / gist:1d9957d1e3449ff6f4f04c02096cdee5
Last active August 2, 2022 06:37
Example count with Doctrine on TYPO3
<?php
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
->getQueryBuilderForTable('tx_crawler_queue');
$sql1 = $queryBuilder
->count('*')
->addSelect('set_id', 'scheduled')
->from('tx_crawler_queue')
->groupBy('set_id', 'scheduled')
@haassie
haassie / PageTs.typoscript
Created January 17, 2018 23:20
Example PageTs config for preview url's
TCEMAIN.preview {
tx_news_domain_model_news {
previewPageId = 7
useCacheHash = 1
useDefaultLanguageRecord = 0
fieldToParameterMap {
uid = tx_news_pi1[news_preview]
}
additionalGetParameters {
tx_news_pi1.controller = News

Keybase proof

I hereby claim:

  • I am haassie on github.
  • I am haassie82 (https://keybase.io/haassie82) on keybase.
  • I have a public key ASAyQSHM8MeyfUsgsF5wk-IIt5MgFkClIjORS2Q1A4TeGgo

To claim this, I am signing this object: