Questions tagged [alias]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
39 views

Template URL/path alias

Is there any way to use an environment variable in the URL and template path settings for sections? We are prototyping a site with a temporary skin running alongside our front-end build but would ...
1
vote
1answer
24 views

Craft site in subfolder of domain

Unusual use-case - but I have a client with two websites they're merging into one. Their aim is to make the Craft 3 site (currently on its own top level domain) run in a /distribution sub folder. I've ...
1
vote
0answers
321 views

Using @webroot in templates returns a different path, can't override in config

I'd like to use @webroot in my templates using the {{ alias('@webroot') }} tag. However, when I do this it returns a longer path than what is returned when I use @webroot in the control panel. For ...
2
votes
1answer
623 views

How do I dynamically define Asset Volumes' Base URLs for different Sites?

There must be a simple answer for this but despite fumbling around with it for quite a while and searching the web for answers I am stymied. Perhaps I'm approaching it in the wrong way. I'm feeling ...
1
vote
1answer
216 views

Are there any benefits to using Yii's Aliases vs getenv?

As part of a refactor on our code base, we have been looking into our use of Yii 2's aliases and PHP's getenv function. Here's a code example: Alias <link rel="icon" sizes="96x96" type="image/png"...
1
vote
1answer
1k views

Invalid path alias

I'm not sure if I understand the alias concept entirely So I want to create an alias. I write a variable into my .env File: SITE_URL_DE="http://hello.local" Then I put it into my general.php File:...