Skip to content
Snippets Groups Projects
setup.typoscript 3.25 KiB
# news feed as own page type
newsFeed = PAGE
newsFeed {
	typeNum = 78906523

	10 = USER
	10 {
		userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
		extensionName = SgNews
		pluginName = NewsFeed
		vendorName = SGalinski
		controller = NewsFeed
		action = index
		view < plugin.tx_sgnews.view
		persistence < plugin.tx_sgnews.persistence
		features < plugin.tx_sgnews.features
		legacy < plugin.tx_sgnews.legacy
		settings {
			# PIDs of news category pages (page doktype, not to be confused with actual sys_category records!!!)
			# If not provided, news of all categories are shown
			showCategories =
			# UIDs of sys_category records, assigned to a news record in `tx_sgnews_tags`
			# If not provided, news of all tags are shown
			showTags =
		}
	}

	config {
		disableAllHeaderCode = 1
		disableCharsetHeader = 1
		no_cache = 1
		xhtml_cleaning = 0
		index_enable = 0
		additionalHeaders {
			10 {
				header = Content-Type:text/xml
				replace = 0
			}
		}
	}
}

# news feed integration into the site
page.headerData {
	273905123652 = TEXT
	273905123652 {
		dataWrap = <link rel="alternate" title="News Feed" type="application/atom+xml" href="{TSFE:absRefPrefix}news.xml" />
	}
}

# content rendering information for the single news view
lib.mainContent < styles.content.get
lib.mainContent.select.where = colPos=1

lib.contentFromAnotherPage = CONTENT
lib.contentFromAnotherPage {
	table = tt_content
	select {
		where = colPos=1
		pidInList = TEXT
		pidInList.data = FIELD:tx_sgnews_content_from_another_page
	}
}

plugin.tx_sgnews {
	view {
		templateRootPaths {
			0 = {$plugin.tx_sgnews.view.templateRootPath}
		}
		partialRootPaths {
			0 = {$plugin.tx_sgnews.view.partialRootPath}
		}

		layoutRootPaths {
			0 = {$plugin.tx_sgnews.view.layoutRootPath}
		}
	}

	persistence {
		enableAutomaticCacheClearing = 0
		updateReferenceIndex = 1
	}

	settings {
		# Name of your site - required for the news.xml
		siteName =

		# Your rootpage id - required for the news.xml to retrieve the base path
		rootpageId = 1

		# News limit (can be usually set also inside the flexforms)
		newsLimitPerPage = {$plugin.tx_sgnews.settings.newsLimitPerPage}

		# Uid of the page containing sys_category records used as tags
		tagPid = {$plugin.tx_sgnews.settings.tagPid}

		# Page id for the additional author news
		authorNewsPid = {$plugin.tx_sgnews.settings.authorNewsPid}

		# How to sort the news in general (date, positionInTree)
		sortBy = date

		# sort direction (DESC / ASC)
		sortDirection = {$plugin.tx_sgnews.settings.sortDirection}

		# The publisher value for the structured data implementation (see single view template)
		publisher =

		# The logo value for the structured data implementation (see single view template)
		publisherLogo =

		# Enable fetching of related news by tag or category, if related news are not set manually
		automaticRelatedNews = {$plugin.tx_sgnews.settings.automaticRelatedNews}

		# Set a limit for fetched related news (for no limit, set to 0)
		limitRelatedNews = {$plugin.tx_sgnews.settings.limitRelatedNews}
	}

	features {
		skipDefaultArguments = 1
	}

	legacy {
		enableLegacyFlashMessageHandling = 0
	}
}

plugin.tx_sgcomments {
	settings {
		additionalMailRecipients {
			preUserFunc = SGalinski\SgNews\UserFunction\AddAdditionalMailRecipients->addAdditionalMailRecipients
		}
	}
}