kapelanmedien/km-eventnews-filter
最新稳定版本:2.0.0
Composer 安装命令:
composer require kapelanmedien/km-eventnews-filter
包简介
Filter event news by organizer, location, date, categories and tags
关键字:
README 文档
README
This extension makes it possible to filter event news in the frontend by the following properties:
- organizer
- location
- date from & to
- categories
- tags
- sword
This extension is an adaption of EXT:news_filter
Requirements
- TYPO3 12.4 or 13.4
- EXT:news 12.x
- EXT:eventnews 7.x
Usage
- Install the extension just as any other extension. Either use the Extension Manager or composer and
composer require kapelanmedien/km-eventnews-filter. - Select the action "list" in the news plugin and activate the additional checkbox "Enable filter"
- Select folders containing categories & tags.
- In order for filtering by organizer and location to work, the event restriction "Only events" must be selected.
TypoScript
The following TypoScript is required
plugin.tx_news.settings.demandClass = KapelanMedien\KmEventnewsFilter\Domain\Model\Dto\Demand
Templating
Add the following part to your List.html:
<f:form action="list" object="{extendedVariables.searchDemand}" name="search" class="news-search-form mb-3">
<fieldset>
<div class="mb-3">
<label class="form-label" for="news-subject"><f:translate key="search-subject" /></label>
<f:form.textfield id="news-subject" property="subject" class="form-control" />
</div>
<f:if condition="{extendedVariables.organizers}">
<div class="mb-3">
<label class="form-label" for="organizers"><f:translate key="organizers" extensionName="eventnews" /></label>
<f:form.select
property="organizers"
id="organizers"
class="form-select"
options="{extendedVariables.organizers}"
optionValueField="uid"
optionLabelField="title"
multiple="multiple"
/>
</div>
</f:if>
<f:if condition="{extendedVariables.locations}">
<div class="mb-3">
<label class="form-label" for="locations"><f:translate key="locations" extensionName="eventnews" /></label>
<f:form.select
property="locations"
id="locations"
class="form-select"
options="{extendedVariables.locations}"
optionValueField="uid"
optionLabelField="title"
multiple="multiple"
/>
</div>
</f:if>
<f:if condition="{extendedVariables.categories}">
<div class="mb-3">
<legend class="form-label"><f:translate key="categories" /></legend>
<f:for each="{extendedVariables.categories}" as="category">
<div class="form-check form-check-inline">
<f:form.checkbox property="filteredCategories" value="{category.uid}" id="category_{category.uid}" class="form-check-input" />
<label class="form-check-label" for="category_{category.uid}">{category.title}</label>
</div>
</f:for>
</div>
</f:if>
<f:if condition="{extendedVariables.tags}">
<div class="mb-3">
<legend class="form-label"><f:translate key="tags" /></legend>
<f:for each="{extendedVariables.tags}" as="tag">
<div class="form-check form-check-inline">
<f:form.checkbox property="filteredTags" value="{tag.uid}" id="tag_{tag.uid}" class="form-check-input" />
<label class="form-check-label" for="tag_{tag.uid}">{tag.title}</label>
</div>
</f:for>
</div>
</f:if>
<div class="mb-3">
<label class="form-label" for="searchDateFrom"><f:translate key="search-date" /></label>
<div class="input-group">
<f:form.textfield type="date" class="form-control" id="searchDateFrom" property="searchDateFrom" />
<label class="input-group-text" for="searchDateTo">-</label>
<f:form.textfield type="date" class="form-control" id="searchDateTo" property="searchDateTo" />
</div>
</div>
<f:form.submit value="{f:translate(key: 'search-start')}" class="btn btn-primary" />
</fieldset>
</f:form>
Order categories, tags, organizers and locations
plugin.tx_news {
settings {
filterCategoriesOrderBy = title
filterCategoriesOrderDirection = asc
filterTagsOrderBy = title
filterTagsOrderDirection = asc
filterOrganizersOrderBy = title
filterOrganizersOrderDirection = asc
filterLocationsOrderBy = title
filterLocationsOrderDirection = asc
}
}
统计信息
- 总下载量: 9
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2024-08-26