Skip to main content

Questions tagged [alias]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4 votes
3 answers

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 ...
qbit76's user avatar
  • 43
3 votes
1 answer

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 ...
Kirk Roberts's user avatar
1 vote
1 answer

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"...
Jamie Wade's user avatar
  • 3,644
1 vote
1 answer

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:...
KSPR's user avatar
  • 3,786
1 vote
1 answer

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, ...
arche's user avatar
  • 13
1 vote
1 answer

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....
Jonathan Schofield's user avatar
1 vote
1 answer

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 ...
Cole Henley's user avatar
  • 1,741
1 vote
1 answer

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 ...
steve's user avatar
  • 131
1 vote
0 answers

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 ...
Lauren's user avatar
  • 171
0 votes
0 answers

@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 ...
MoritzLost's user avatar
  • 11.7k