gedankenfolger / gedankenfolger-viewhelper
A collection of viewhelpers to make the work a little bit easier
Package info
github.com/gf-ntiedt/gedankenfolger-viewhelper
Type:typo3-cms-extension
pkg:composer/gedankenfolger/gedankenfolger-viewhelper
Requires
- typo3/cms-core: ^14.3
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-06 10:56:22 UTC
README
A collection of viewhelpers to make the work a little bit easier.
TYPO3 Extension Repository | GitHub | Gedankenfolger GmbH
First of all many thanks to the hole TYPO3 community, all supporters of TYPO3 and especially to the TYPO3-Team + Gedankenfolger GmbH.
Contents of this file
Viewhelper:
IpViewHelper
ViewHelper to determine and output the client IP address.
By default (secureMode="false") this ViewHelper checks in the following order:
- HTTP_CLIENT_IP (shared internet)
- HTTP_X_FORWARDED_FOR (proxy)
- REMOTE_ADDR (direct connection)
Example usage:
<!-- Output the client IP address --> <gfv:ip /> {gfv:ip()} <!-- Compare against a specific IP --> <f:if condition="{gfv:ip()} == '200.200.200.200'"> <!-- content shown only for this IP --> </f:if>
Returns an empty string when no valid IP address can be determined (e.g. CLI context).
Warning: In default mode, the returned value is read directly from client-controlled HTTP headers and is not verified against TYPO3's reverse-proxy trust configuration. Any visitor can send a forged value for these headers, so the result must never be used for access control, authentication, logging for audit purposes, or any other secret or security-relevant decision.
secureMode="true" instead resolves the address via TYPO3's own
reverse-proxy trust mechanism (NormalizedParams), which only trusts proxy
headers when the request actually comes from a proxy listed in
SYS/reverseProxyIP:
{gfv:ip(secureMode: true)}
Important: secureMode="true" is only trustworthy once
SYS/reverseProxyIP and SYS/reverseProxyHeaderMultiValue are
correctly configured for the environment this extension runs in (the real IP ranges of
whatever reverse proxy/CDN sits in front of the site). Without that configuration,
secureMode="true" silently returns REMOTE_ADDR — behind a
reverse proxy, that is the proxy's own address, not the visitor's — with no error or
warning.
Namespace cloudflare:
{gfv:cloudflare}
StreamIframeViewHelper
Generates an iframe tag to embed a Cloudflare Stream video.
Constructs the iframe src URL by concatenating:
-
streamid:
Cloudflare Stream video ID -
customerid:
Cloudflare customer/account ID
Optional parameters:
-
preload:
Video preload mode
Default:'none' -
loop:
Loop video after end
Default:false -
muted:
Start muted
Default:false -
autoplay:
Autoplay video
Default:null -
poster:
Poster timestamp in seconds
Default:null
Example usage:
<gfv:streamIframe streamid="abc123" customerid="42" preload="auto" loop="true" muted="false" autoplay="true" />
Namespace resource:
{gfv:resource}
SvgInlineViewHelper
Renders an SVG file inline by embedding its XML content directly into the output.
It handles loading the file via FAL (File or FileReference) or by path, validates that the file is non-empty and an SVG, then parses and injects attributes safely.
Pass additional data-attributes or arbitrary attributes via `data` and `additionalAttributes` arguments.
Example usage:
<gfv:resource.svgInline src="EXT:Sitepackage/Resources/Public/Logo.svg" width="200" />
or
<gfv:resource.svgInline image="{fileReference}" class="icon" id="logo" viewBox="0 0 100 100" />
Namespace link:
{gfv:link}
TelViewHelper — link.tel
Renders an <a href="[scheme]+..."> link for a phone number.
The number is normalized to E.164 format. The original formatted number is used as link text
unless child content is provided.
-
number:
Phone number in international format (must start with +)
Optional parameters:
-
scheme:
URI scheme to prepend. Allowed:tel:,fax:,sms:,callto:
Default:tel: -
class, id, title, etc.:
All standard HTML tag attributes are supported.
Example usage:
<gfv:link.tel number="+49 (0) 7777 77 77 77" /> <gfv:link.tel number="+49 (0) 7777 77 77 77" scheme="fax:" /> <gfv:link.tel number="+49 (0) 7777 77 77 77">Call us</gfv:link.tel> {gfv:link.tel(number: '+49 (0) 7777 77 77 77')}
Namespace uri:
{gfv:uri}
TelViewHelper — uri.tel
Returns a tel: URI string for a phone number without rendering an HTML tag.
Use this when you need the href value only, e.g. to pass it to another ViewHelper.
-
number:
Phone number in international format (must start with +)
Example usage:
{gfv:uri.tel(number: '+49 (0) 7777 77 77 77')}
<a href="{gfv:uri.tel(number: phoneNumber)}">Call</a>
Namespace composer:
{gfv:composer}
PackageInfoViewHelper
This ViewHelper exposes package metadata as reported by Composer\InstalledVersions
-
name:
Composer package name ("vendor/package") or ext key if heuristicResolve=1.
Optional parameters:
-
key:
Optional key to return: packageName|isInstalled|version|prettyVersion|reference|installPath.
Default:'' -
jsonEncode:
Return JSON-encoded result (useful for arrays).
Default:false -
heuristicResolve:
Resolve ext key to package by suffix match if no slash is present.
Default:true -
exposeInstallPath:
Include absolute install path (can be sensitive).
Default:false
Example usage:
<gf:composer.packageInfo name="vendor/package" key="prettyVersion" />
Changelog
See CHANGELOG.md — generated with git-cliff from Conventional Commits.
Acknowledgements
This extension builds on the following open source projects:
Notice on Logo / Trademark Use
The logo used in this extension is protected by copyright and, where applicable, trademark law and remains the exclusive property of Gedankenfolger GmbH.
Use of the logo is only permitted in the form provided here. Any changes, modifications, or adaptations of the logo, as well as its use in other projects, applications, or contexts, require the prior written consent of Gedankenfolger GmbH.
In forks, derivatives, or further developments of this extension, the logo may only be used if explicit consent has been granted by Gedankenfolger GmbH. Otherwise, the logo must be removed or replaced with an own, non-protected logo.
All other logos and icons bundled with this extension are either subject to the TYPO3 licensing terms (The MIT License (MIT), see https://typo3.org) or are in the public domain.
For full license terms covering all graphic assets, see LICENSE-ICONS.