Git Product home page Git Product logo

news_filter's Introduction

TYPO3 Extension news_filter

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

  • date from & to
  • categories
  • tags

This extension has been sponsored by University Basel

Requirements

  • TYPO3 8.7 - 9.5 (7 should work as well)
  • news 7.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 active the enable checkbox
  3. Select page of categories & tags.

Templating

Add the following part to your List.html:

	<f:form action="list" object="{extendedVariables.searchDemand}" name="search" class="form-horizontal">
		<fieldset>
			<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>

news_filter's People

Contributors

georgringer avatar

Watchers

James Cloos avatar

Forkers

megafry

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.