Skip to content

Commit

Permalink
Merge pull request #27 from netlogix/bugfix/url-support
Browse files Browse the repository at this point in the history
  • Loading branch information
saschanowak authored Sep 12, 2024
2 parents 7a6ecac + 2dccb19 commit 66a5bfc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Classes/ViewHelpers/StencilViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ protected function getUrl(string $url): ?string

private function getAbsoluteWebPath(string $file, bool $cacheBreaker = false): string
{
if (PathUtility::hasProtocolAndScheme($file)) {
return $file;
}

if (PathUtility::isExtensionPath($file)) {
$file = Environment::getPublicPath() . '/' . PathUtility::getPublicResourceWebPath($file, false);
// as the path is now absolute, make it "relative" to the current script to stay compatible
Expand Down

0 comments on commit 66a5bfc

Please sign in to comment.