PHPackages                             portrino/px\_semantic - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. portrino/px\_semantic

AbandonedArchivedTypo3-cms-extension[API Development](/categories/api)

portrino/px\_semantic
=====================

Structured Data Rendering for TYPO3. Easy Building of Linked Data API based on Hydra.

2.5.1(4y ago)177142[1 PRs](https://github.com/portrino/px_semantic/pulls)GPL-2.0+PHPPHP &gt;= 5.5.0, &lt;= 7.1.99

Since Jan 26Pushed 4y ago7 watchersCompare

[ Source](https://github.com/portrino/px_semantic)[ Packagist](https://packagist.org/packages/portrino/px_semantic)[ Docs](http://www.portrino.de)[ RSS](/packages/portrino-px-semantic/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (18)Used By (0)

px\_semantic 2.5.0 (beta)
=========================

[](#px_semantic-250-beta)

[![Latest Stable Version](https://camo.githubusercontent.com/74dd31b6b1d7512dd055f4bda84139befc88be605973b4c713d42a7c26091519/68747470733a2f2f706f7365722e707567782e6f72672f706f727472696e6f2f70785f73656d616e7469632f762f737461626c65)](https://packagist.org/packages/portrino/px_semantic)[![Total Downloads](https://camo.githubusercontent.com/b9965cb7e15c56183d7f5546b3d5359e37c27ebb34fb1337889639a3f780c451/68747470733a2f2f706f7365722e707567782e6f72672f706f727472696e6f2f70785f73656d616e7469632f646f776e6c6f616473)](https://packagist.org/packages/portrino/px_semantic)

Structured Data Markup Rendering for TYPO3 with JSON-LD

**PxSemantic** provides an extrem dynamic and highly customizable solution to embed structured data on your website and enrich them with information about your website. The currently supported classes are a subset of the vocabulary defined on  and were generated with the schema generator from . At the moment we only support [json-ld](http://json-ld.org/) format to encode LinkedData.

Before you start:

- Download / Import from [TER](http://typo3.org/extensions/repository/view/px_semantic) or [GitHub](https://github.com/portrino/px_semantic)
- Install the Extension
- Include Static Template Files!

### Example 1 - Render Organization Information

[](#example-1---render-organization-information)

For example you want to markup your official website with information about your corporate contacts () you can do it this way:

Declare your organization information and corporate contact via TypoScript.

###### TypoScript:

[](#typoscript)

```

lib.structuredDataMarkupOrganization < lib.structuredDataMarkup
lib.structuredDataMarkupOrganization {
    settings {
        entity = Portrino\PxSemantic\SchemaOrg\Organization
        processors {
            # processor to set properties of an entity via TypoScript
            0 {
                className = Portrino\PxSemantic\Processor\TypoScriptProcessor
                settings {
                    # for string values you do not have to use TEXT datatype, you can just write "key = value"
                    # US, GB, DE
                    areaServed = DE

                    contactPoint {
                        # "customer support", "technical support", "billing support", ...
                        contactType = customer support
                        telephone = +49-123-456-78
                    }

                    logo {
                        # get the logo image uri via TS and prepend the baseUrl to get the absolute path
                        url = IMG_RESOURCE
                        url {
                            file = fileadmin/company_logo.png
                            stdWrap.wrap = {TSFE:baseUrl}|
                            stdWrap.insertData = 1
                        }
                    }
                    # special datatype from px_semantic EXT to define arrays
                    sameAs = Portrino\PxSemantic\Converter\ArrayConverter
                    sameAs {
                        0 = http://www.facebook.com/yourSite/
                        1 = http://www.youtube.com/user/yourSite/
                        2 = http://www.pinterest.com/yourSite/
                    }
                    # use typolink to generate link to the root page
                    url = TEXT
                    url.typolink {
                        parameter = 1
                        returnLast = url
                    }
                }
            }
        }
    }
}

```

Use the TS to render the resulting JSON-LD code somewhere on your website. We put it into the `` because other meta information are also located within the `` tag. But it doesn`t matter.

Google says:

> You can embed data in a web page using schema.org field names and the new JSON-LD data format. JSON-LD is easy to produce with many widely available JSON encoders. The data, enclosed within the ` ... ` tags as shown in the examples below, may be placed in either the
>
>  or region of the page that displays that event. Either way, it won't affect how your document appears in users' web browsers. -- \[Google Documentation\]\[1\]

###### TypoScript:

[](#typoscript-1)

```

page.headerData.1453734422 < lib.structuredDataMarkupOrganization

```

If you want to put it in your template you could make use fluids `cObject`-ViewHelper:

###### Fluid:

[](#fluid)

```

```

This will result in the following JSON-LD Markup on your page

```

{
    "@context" : "http://schema.org",
    "@type" : "Organization",
    "areaServed":"DE"
    "url" : "http://www.your-company-site.com",
    "contactPoint" : {
        "@type" : "ContactPoint",
        "areaServed":"DE",
        "telephone" : "+49-123-456-78",
        "contactType" : "customer support"
    },
    "logo": {
        "@type":"ImageObject",
        "url":"http://www.your-company-site.com/fileadmin/company_logo.png"
    },
    "sameAs":[
        "http:\\www.facebook.com\yourSite",
        "http:\\www.youtube.com\user\yourSite",
        "http:\\www.pinterest.com\yourSite\"
    ]
}

```

### Example 2 - Render Multiple Entities

[](#example-2---render-multiple-entities)

*TypoScript*:

```

    lib.structuredDataMarkupExample < lib.structuredDataMarkup
    lib.structuredDataMarkupExample {
        settings {
            entity {
                className = Portrino\PxSemantic\SchemaOrg\Question

                id = TEXT
                id.data = field:uid
            }
            processors {
                0 {
                    className = Portrino\PxSemantic\Processor\ExampleProcessor
                }
            }
        }
    }

```

*Fluid*:

```

        {entity -> f:cObject(typoscriptObjectPath: 'lib.structuredDataMarkupExample')}

```

### Example 3 - Create LinkedData REST API

[](#example-3---create-linkeddata-rest-api)

Since version **2.0.0** it is possible to configure an LinkedData REST API which is based on Hydra Core Vocabulary ()

*TypoScript*:

- create a page e.g. called "api (123)" within your page tree for better realurl configuration

*constants.txt*

```

plugin.tx_pxsemantic {
    settings {
            rest {
                pid = 123
            }
        }
    }
}

```

- now configure for each endpoint of your rest api the resource to entity mapping like in the easy example below
- as for strcutured data markup in exampe 1 and example 2 you could (re)use `processors` to transform your resource (aka domain model) into an  entity

*setup.txt*

```

plugin.tx_pxsemantic {
    settings {
            rest {
                endpoints {
                    pages {
                        entity = Portrino\PxSemantic\SchemaOrg\CreativeWork
                        resource = Portrino\PxSemantic\Domain\Model\Page
                        processors {
                            0 {
                                className = Portrino\PxSemantic\Processor\PageProcessor
                            }
                        }
                    }
                }
            }
        }
    }
}

```

- add this realurl configuration for nicer uris of your rest API

*realurl\_conf.php*

```

...

  'fixedPostVars' => [
        '_DEFAULT' => [],
        'api' => [
            [
                'GETvar' => 'type',
                'valueMap' => [
                    'structured-data' => 1475825939,
                    'structured-data-contexts' => 1476721757,
                    'vocab' => 1476770090
                ]
            ],
            [
                'GETvar' => 'tx_pxsemantic_hydraapi[endpoint]',
                'valueMap' => [
                    'recipes' => 'recipes',
                    'pages' => 'pages'
                ],
                'noMatch' => 'bypass'
            ],
            [
                'GETvar' => 'tx_pxsemantic_hydracontext[context]',
                'valueMap' => [
                    'Entrypoint' => 'Entrypoint',
                ],
                'noMatch' => 'bypass'
            ],
            [
                'cond'        => [
                    'prevValueInList' => 'pages'
                ],
                'GETvar'      => 'tx_pxsemantic_hydraapi[uid]',
                'lookUpTable' => [
                    'table'       => 'pages',
                    'id_field'    => 'uid',
                    'alias_field' => 'uid'
                ],
                'optional'    => true
            ]
        ],
        '123' => 'api'
    ],

...

```

- now you can call your Linked Data REST API via:  which will be presented as PagedCollection ()
- add this url to hydra console () will give you a nice hydra documentation

More Examples
=============

[](#more-examples)

- Could be found under:

Authors
-------

[](#authors)

[![](https://avatars0.githubusercontent.com/u/726519?s=40&v=4)](https://avatars0.githubusercontent.com/u/726519?s=40&v=4)[![](https://avatars0.githubusercontent.com/u/540478?s=40&v=4)](https://avatars0.githubusercontent.com/u/540478?s=40&v=4)

- **André Wuttig** - *Initial work, Semantic REST API, Documentation* - [aWuttig](https://github.com/aWuttig)
- **Axel Böswetter** - *some more semantic.org entities* - [EvilBMP](https://github.com/EvilBMP)

See also the list of [contributors](https://github.com/portrino/px_semantic/graphs/contributors) who participated in this project.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 87.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~146 days

Recently: every ~424 days

Total

16

Last Release

1621d ago

Major Versions

1.5.0 → 2.0.02016-11-11

### Community

Maintainers

![](https://www.gravatar.com/avatar/03867e1d2497d7cb7feb932fb301387e143503bfd17c584ef90347b3d7942cf1?d=identicon)[portrino-dev](/maintainers/portrino-dev)

---

Top Contributors

[![aWuttig](https://avatars.githubusercontent.com/u/726519?v=4)](https://github.com/aWuttig "aWuttig (71 commits)")[![EvilBMP](https://avatars.githubusercontent.com/u/540478?v=4)](https://github.com/EvilBMP "EvilBMP (6 commits)")[![SadlerJohnson](https://avatars.githubusercontent.com/u/25384423?v=4)](https://github.com/SadlerJohnson "SadlerJohnson (2 commits)")[![tgriessbach](https://avatars.githubusercontent.com/u/11647324?v=4)](https://github.com/tgriessbach "tgriessbach (1 commits)")[![ThomasElze](https://avatars.githubusercontent.com/u/11872416?v=4)](https://github.com/ThomasElze "ThomasElze (1 commits)")

---

Tags

googleHydracmstypo3schema-orgStructuredDataSemanticWebRichSnippets

### Embed Badge

![Health badge](/badges/portrino-px-semantic/health.svg)

```
[![Health](https://phpackages.com/badges/portrino-px-semantic/health.svg)](https://phpackages.com/packages/portrino-px-semantic)
```

###  Alternatives

[wazum/sluggi

TYPO3 extension for URL slug management with inline editing, auto-sync, locking, access control, and redirects

41515.2k](/packages/wazum-sluggi)[dmitryd/typo3-dd-googlesitemap

Google sitemaps for TYPO3

23198.1k](/packages/dmitryd-typo3-dd-googlesitemap)[b13/slimphp-bridge

Provides a middleware for registering Slim PHP applications within TYPO3 Frontend Sites

2048.8k1](/packages/b13-slimphp-bridge)[friendsoftypo3/interest

REST and CLI API for adding, updating, and deleting records in TYPO3. Tracks relations so records can be inserted in any order. Uses remote ID mapping so you don't have to keep track of what UID a record has gotten after import. Data is inserted using backend APIs as if a real human did it, so you can can inspect the record history and undo actions.

122.1k1](/packages/friendsoftypo3-interest)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
