Questions tagged [alias]
The alias tag has no usage guidance.
10
questions
1
vote
1
answer
22
views
Alias not being resolved directly within an attribute in Twig templates
Is this a bug or is this me ? (I'm a new to craft)
When using the @web alias directly within an attribute in a Twig template, the alias doesn't seem to be resolved to its corresponding URL. Instead, ...
1
vote
1
answer
67
views
Help with configuring the @webroot alias
I have a hosting account running Craft 4.4.17 with a structure like this:
home/
accname/
craft's usual files and folder arrangement
domainname.tld <-- web root
index....
0
votes
0
answers
240
views
@web alias in multisite setup with different domains
We're working a multisite project where the individual sites have different domains. We want to have a simple setup where both sites share an asset folder (web/cms-assets). So far, we're looking at ...
3
votes
3
answers
884
views
Ensure @web alias is explicitly overridden
I just stumbled upon this advice in my Craft3-system report:
"Ensure @web alias is explicitly overridden"
In which file do I need to put the override? "config/general.php" doesn't ...
1
vote
1
answer
281
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
1
answer
149
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
0
answers
690
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 ...
3
votes
1
answer
1k
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
1
answer
390
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
1
answer
2k
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:...