Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Configuration/Sets/Maps2/settings.definitions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ settings:
category: 'Maps2.templates.infoWindowContent'
description: 'If you click on a marker (POI) a little info window will appear. With this setting you can change the template to your own needs.'
type: string
default: 'EXT:maps2/Resources/Private/Templates/InfoWindowContent.html'
default: 'EXT:maps2/Resources/Private/Templates/InfoWindowContent.fluid.html'
maps2.infoWindowContent.imageHeight:
label: 'Image Height'
category: 'Maps2.templates.infoWindowContent'
Expand Down
9 changes: 9 additions & 0 deletions Documentation/ChangeLog/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
ChangeLog
=========

Version 13.1.1
==============

* BUGFIX: Point the default info window template setting to the existing
`InfoWindowContent.fluid.html` template
* BUGFIX: Render info window content with `f:format.html`. `f:transform.html`
requires `$GLOBALS['TYPO3_REQUEST']`, which the info window middleware does
not set

Version 13.1.0
==============

Expand Down
2 changes: 1 addition & 1 deletion Documentation/Configuration/Extension/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ activation of Google Maps for current browser session.
infoWindowContentTemplatePath
-----------------------------

Default: `EXT:maps2/Resources/Private/Templates/InfoWindowContent.html`
Default: `EXT:maps2/Resources/Private/Templates/InfoWindowContent.fluid.html`

You can define your own default template for the info window content when
clicking on a marker. Further you can override this template path again with
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Partials/InfoWindowContent.fluid.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@

<f:if condition="{poiCollection.info_window_content}">
<br/>
<div class="infoWindowContent">{poiCollection.info_window_content -> f:transform.html()}</div>
<div class="infoWindowContent">{poiCollection.info_window_content -> f:format.html()}</div>
</f:if>
</html>
33 changes: 33 additions & 0 deletions Tests/Unit/Configuration/SiteSetSettingsTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

declare(strict_types=1);

/*
* This file is part of the package jweiland/maps2.
*
* For the full copyright and license information, please read the
* LICENSE file that was distributed with this source code.
*/

namespace JWeiland\Maps2\Tests\Unit\Configuration;

use PHPUnit\Framework\Attributes\Test;
use Symfony\Component\Yaml\Yaml;
use TYPO3\TestingFramework\Core\Unit\UnitTestCase;

/**
* Class SiteSetSettingsTest
*/
class SiteSetSettingsTest extends UnitTestCase
{
#[Test]
public function defaultInfoWindowContentTemplateExists(): void
{
$extensionPath = dirname(__DIR__, 3) . '/';
$definitions = Yaml::parseFile($extensionPath . 'Configuration/Sets/Maps2/settings.definitions.yaml');
$templatePath = $definitions['settings']['maps2.infoWindowContent.templatePath']['default'];

self::assertStringStartsWith('EXT:maps2/', $templatePath);
self::assertFileExists($extensionPath . substr($templatePath, strlen('EXT:maps2/')));
}
}