Skip to content

Dependence of obtained value in website_settings on site id #17707

Discussion options

You must be logged in to vote

The pimcore_website_config twig funciton doesn't have a way to set a Site, therefore pimcore_website_config('phone',siteId) is actually wrong
See also

public function getWebsiteConfig(string $key = null, mixed $default = null, string $language = null): mixed

What you want to achieve might be done by passing a document of the give site by contentDocument to the request stack, see

pimcore/lib/Config.php

Lines 200 to 206 in 3ffaeac

$originDocument = Pimcore::getContainer()->get('request_stack')->getMainRequest()->get(DynamicRouter::CONTENT_KEY);
if ($originDocument) {
$site = Tool\…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@kingjia90
Comment options

@kingjia90
Comment options

@twin-elements
Comment options

Answer selected by twin-elements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants