gedankenfolger/gedankenfolger-viewhelper

A collection of viewhelpers to make the work a little bit easier

Maintainers

Package info

github.com/gf-ntiedt/gedankenfolger-viewhelper

Type:typo3-cms-extension

pkg:composer/gedankenfolger/gedankenfolger-viewhelper

Transparency log

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

14.1.1 2026-06-26 08:55 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

  1. Viewhelper
    1. IpViewHelper
    2. StreamIframeViewHelper
    3. SvgInlineViewHelper
    4. TelViewHelper (link.tel)
    5. TelViewHelper (uri.tel)
    6. PackageInfoViewHelper
  2. Changelog
  3. Acknowledgements
  4. Notice on Logo / Trademark Use

Viewhelper:

IpViewHelper

ViewHelper to determine and output the client IP address.
This ViewHelper checks in the following order:

  1. HTTP_CLIENT_IP (shared internet)
  2. HTTP_X_FORWARDED_FOR (proxy)
  3. 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).

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.