Commit e08e59d1 authored by Stefan Busemann's avatar Stefan Busemann

Merge branch 'feature/add-events-to-search' into 'develop'

Add events to search

See merge request !336
parents 8ebdcb65 a4359667
Pipeline #8364 passed with stages
in 5 minutes and 5 seconds
......@@ -16,6 +16,10 @@ plugin.tx_solr {
search {
query {
allowedSites = __all
filter {
event = (+type:tx_sfeventmgt_domain_model_event +enddate_dateS:[NOW TO *]) OR (+type:* -type:tx_sfeventmgt_domain_model_event)
}
sortBy = startdate_intS asc
}
}
......@@ -60,6 +64,67 @@ plugin.tx_solr {
}
}
}
events = 1
events {
table = tx_sfeventmgt_domain_model_event
fields {
title = title
content = description
location_stringS = SOLR_RELATION
location_stringS {
localField = location
}
city_stringS = SOLR_RELATION
city_stringS {
localField = location
foreignLabelField = city
}
country_stringS = SOLR_RELATION
country_stringS {
localField = location
foreignLabelField = country
}
image_intM = SOLR_RELATION
image_intM {
localField = image
multiValue = 1
}
startdate_intS = TEXT
startdate_intS {
field = startdate
}
startdate_dateS = TEXT
startdate_dateS {
field = startdate
date = Y-m-d\TH:i:s\Z
}
enddate_intS = TEXT
enddate_intS {
field = enddate
}
enddate_dateS = TEXT
enddate_dateS {
field = enddate
date = Y-m-d\TH:i:s\Z
}
url = TEXT
url.typolink {
parameter = 230
additionalParams = &tx_sfeventmgt_pievent[event]={field:uid}&tx_sfeventmgt_pievent[action]=detail&tx_sfeventmgt_pievent[controller]=Event
additionalParams.insertData = 1
returnLast = url
}
}
}
}
}
}
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<li class=""
data-document-score="{document.score}"
data-document-id="{document.id}"
data-document-url="{document.url}"
>
<div class="row">
<div class="col-12 mt-3">
<div class="card listing__group-item card-date">
<div class="card-horizontal" style="display: flex;">
<div class="d-flex mr-sm-4">
<time class="listing__group-item_time" datetime="{document.startdate_intS -> f:format.date(format:'Y-m-d H:i')}">
<span class="listing__group-item_time-day mt-sm-2">{document.startdate_intS -> f:format.date(format:'d')}</span>
<span class="listing__group-item_time-month">{document.startdate_intS -> f:format.date(format:'M')}</span>
<span class="listing__group-item_time-year">{document.startdate_intS -> f:format.date(format:'Y')}</span>
</time>
</div>
<div class="card-body" style="display: block;">
<h4 class="card-title">
<a href="{s:uri.result.addSearchWordList(url:document.url, searchWords:resultSet.usedQuery.keywords)}">
{document.title}
</a>
</h4>
<p class="card-text">{document.content -> f:format.crop(maxCharacters:'200') -> f:format.striptags()}</p>
</div>
</div>
<f:if condition="{document.location_stringS}">
<div class="card-footer">
<small class="text-muted">Location: {document.location_stringS}<f:if condition="{document.city_stringS}"> in {document.city_stringS}, {document.country_stringS}</f:if></small>
</div>
</f:if>
</div>
</div>
</div>
</li>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment