diff --git a/components/asset.rst b/components/asset.rst index f81b97c855f..6380ee5af58 100644 --- a/components/asset.rst +++ b/components/asset.rst @@ -215,7 +215,7 @@ that path over and over again:: // result: /static/images/logo.png?v1 // Base path is ignored when using absolute paths - echo $package->getUrl('/logo.png'); + echo $pathPackage->getUrl('/logo.png'); // result: /logo.png?v1 Request Context Aware Assets @@ -239,7 +239,7 @@ class can take into account the context of the current request:: // result: /somewhere/static/images/logo.png?v1 // Both "base path" and "base url" are ignored when using absolute path for asset - echo $package->getUrl('/logo.png'); + echo $pathPackage->getUrl('/logo.png'); // result: /logo.png?v1 Now that the request context is set, the ``PathPackage`` will prepend the