定制 georgringer/news-filter 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

georgringer/news-filter

Composer 安装命令:

composer require georgringer/news-filter

包简介

Filter news by date, categories and tags

README 文档

README

This extension makes it possible to filter news in the frontend by the following properties:

  • date from & to
  • categories
  • tags
  • sword

This extension has been sponsored by University Basel

Requirements

  • TYPO3 11.5 or 12.4
  • EXT:news 11.x

Usage

  1. Install the extension just as any other extension. Either use the Extension Manager or composer and composer require georgringer/news-filter.
  2. Select the action "list" in the news plugin and activate the additional checkbox "Enable filter".
  3. Select folders containing categories & tags.

TypoScript

The following TypoScript is required

plugin.tx_news.settings.demandClass = GeorgRinger\NewsFilter\Domain\Model\Dto\Demand

Templating

Add the following part to your News/List.html:

	<f:form action="list" object="{extendedVariables.searchDemand}" name="search" class="form-horizontal">
		<fieldset>
			<div class="form-group">
				<label for="news-subject"><f:translate key="search-subject" /></label>
				<f:form.textfield id="news-subject" property="subject" class="form-control"/>
			</div>
			<div class="form-group">
				<f:for each="{extendedVariables.categories}" as="category">
					<div class="checkbox">
						<label>
							<f:form.checkbox property="filteredCategories" value="{category.uid}"/>
							{category.title}
						</label>
					</div>
				</f:for>
			</div>
			<div class="form-group">
				<f:for each="{extendedVariables.tags}" as="tag">
					<div class="tag">
						<label>
							<f:form.checkbox property="filteredTags" value="{tag.uid}"/>
							{tag.title}
						</label>
					</div>
				</f:for>
			</div>

			<div class="form-group">
				<label for="fromDate" class="col-sm-2 control-label">Date from</label>
				<div class="col-sm-10">
					<f:form.textfield type="date" class="form-control" id="fromDate" property="fromDate"/>
				</div>
			</div>
			<div class="form-group">
				<label for="toDate" class="col-sm-2 control-label">Date to</label>
				<div class="col-sm-10">
					<f:form.textfield type="date" class="form-control" id="toDate" property="toDate"/>
				</div>
			</div>

			<f:form.submit value="submit" class="btn btn-primary"/>
		</fieldset>
	</f:form>

Order categories and tags

plugin.tx_news {
	settings {
		filterCategoriesOrderBy = title
		filterCategoriesOrderDirection = asc

		filterTagsOrderBy = title
		filterTagsOrderDirection = asc
	}
}

统计信息

  • 总下载量: 12.55k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 2
  • Forks: 20
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2018-11-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固