{"id":21277946,"url":"https://github.com/b13/host_variants","last_synced_at":"2025-04-05T20:05:25.968Z","repository":{"id":55117257,"uuid":"274919287","full_name":"b13/host_variants","owner":"b13","description":"TYPO3 extension to extend the base variants condition in the site configuration with the current host.","archived":false,"fork":false,"pushed_at":"2024-11-01T09:14:13.000Z","size":30,"stargazers_count":33,"open_issues_count":1,"forks_count":4,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-03-29T19:02:12.493Z","etag":null,"topics":["typo3-extension"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/b13.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-25T13:09:53.000Z","updated_at":"2025-03-25T18:35:18.000Z","dependencies_parsed_at":"2024-11-01T09:24:41.942Z","dependency_job_id":"8178d78c-cc54-4c7a-b20a-f22b81d1629e","html_url":"https://github.com/b13/host_variants","commit_stats":{"total_commits":8,"total_committers":4,"mean_commits":2.0,"dds":0.375,"last_synced_commit":"98907fcc7bf11b5a239419f9b7b4e63ede0623f2"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b13%2Fhost_variants","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b13%2Fhost_variants/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b13%2Fhost_variants/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b13%2Fhost_variants/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/b13","download_url":"https://codeload.github.com/b13/host_variants/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393568,"owners_count":20931812,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["typo3-extension"],"created_at":"2024-11-21T10:08:22.967Z","updated_at":"2025-04-05T20:05:25.944Z","avatar_url":"https://github.com/b13.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EXT: host_variants\n\nThis extension allows to configure a base variant in TYPO3s Site Configuration depending\non the current Host.\n\n## When is it useful?\n\nThis extension can be useful when dealing with multiple sites in one TYPO3 instance\nwith different domains:\n\nLet's say you have a primary domain `primary-domain.tld` with a site configuration.\nBackend editors log in to this primary domain.\n\nYou have a site config with an own page tree for a second domain `another-domain.tld`.\nEditors create content for the second domain on a hidden page. When previewing that\npage from within the backend, `another-domain.tld/some-page-slug` will be shown. Since\neditors are logged in to the primary domain, the backend user cookie will not be sent by\nthe browser for the secondary domain, the frontend does not see a logged in backend\nuser and will show a 404.\n\nThe extension now allows configuring a site base variant for the secondary domain that\nkicks in when backend preview is called from the main domain, and calls the frontend\nof the secondary site as a sub path of the main domain instead.\n\n\n## Requirements\n\n* TYPO3 v11 LTS, v12 LTS or v13 LTS\n\n## Installation and Setup\nInstall the extension via your preferred way. No further setup is required.\nThe extension works out of the box.\n\n## What it does\nThe extension adds a variable `host` to the expression language for the Site Configuration.\nThis allows configuring multiple domains for the same root page.\n\n## Example\n\nBasic:\n\n```yaml\nbase: 'https://another-domain.tld/'\nbaseVariants:\n  -\n    base: 'https://primary-domain.tld/some-sub-path'\n    condition: 'host == \"primary-domain.tld\"'\n```\n\nUsing some ENV variable:\n\n```yaml\nbase: 'https://another-domain.tld/'\nbaseVariants:\n  -\n    base: 'https://%env(MAIN_DOMAIN)%/some-sub-path'\n    condition: 'host == \"%env(MAIN_DOMAIN)%\"'\n```\n\nCombining conditions:\n\n```yaml\nbase: 'https://another-domain.tld/'\nbaseVariants:\n  -\n    base: 'https://local1.local/'\n    condition: 'applicationContext == \"Development\" \u0026\u0026 host == \"local1.local\"'\n  -\n    base: 'https://local2.local/'\n    condition: 'applicationContext == \"Development\" \u0026\u0026 host == \"local2.local\"'\n```\n\n---\n\n\n_Made by [b13](https://b13.com) with ♥_\n\n[Find more TYPO3 extensions we have developed](https://b13.com/useful-typo3-extensions-from-b13-to-you) that help us deliver value in client projects. As part of the way we work, we focus on testing and best practices to ensure long-term performance, reliability, and results in all our code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb13%2Fhost_variants","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fb13%2Fhost_variants","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb13%2Fhost_variants/lists"}