All Questions

Filter by
Sorted by
Tagged with
15 votes
1 answer

How do you sort elements queried from multiple channels?

This is how I query elements from multiple channels: {% set allEntries = craft.entries.section(['publication','text', 'exhibition']).limit(null) %} I now want to sort all these entries by a custom ...
carlcs's user avatar
  • 36.2k
7 votes
1 answer

How can I use operators within Twig hashes?

I'm looking for documentation on how to use operators in hashes in Twig. Someone mentioned this in the Google+ support group the other day and I was unable to find any docs or examples. {% set ...
Steve Adams's user avatar
  • 1,671
25 votes
9 answers

How can I build a language switcher?

I'm currently building a site with two languages, and I need a language switcher so wherever you enter the website you can switch the language easily. I've come this far: {% for locale in craft.i18n....
KSPR's user avatar
  • 3,776
6 votes
2 answers

Using auto-generated titles against entry field type values

How would you setup a section's entry type to auto-generate the titles based on the title (or slug) of another entry? For example, we have a Software section with entries. We also have a Releases ...
Joel Bradbury's user avatar
11 votes
2 answers

Search matrix for blocks with upcoming dates

I have a matrix field with one "event" block type that contains several fields. One of those fields is a date field. Is there a way to get just blocks with upcoming dates?
André Elvan's user avatar
  • 7,278
9 votes
2 answers

How can I run the Control Panel from a separate domain?

Is it possible to separate the public site and the Control Panel on separate domains (i.e. and With baseCpUrl you're able to force the admin URL to, ...
Christofer Sandin's user avatar
18 votes
1 answer

How do you create a front-end form for users to submit content?

I'd like to create a form for users to load events (that I will moderate and publish). How do I do this?
Richard Frank's user avatar
9 votes
3 answers

What accurately will set asset paths for multilingual sites?

This is actually a fairly crucial matter, since relative paths definitely won't work with languages, unless you really want all assets in a given Source to be localized or at least copied to each ...
narration_sd's user avatar
  • 1,697
31 votes
2 answers

How can I prevent my client from auto-updating Craft in production?

How can I prevent my client from auto-updating Craft in production? I don't want them to run Craft updates on the production site, but the "updates" badge seems irresistible to them. I would prefer to ...
Alex Kendrick's user avatar
38 votes
5 answers

How can I retrieve channel data in json format?

I've played around with a few implementations but I still don't feel like either is right. I first came across building the JSON itself. This would be in a file at "craft/templates/entries.json". [ ...
Bill Criswell's user avatar
20 votes
3 answers

How can I check on the value of a template variable?

If I'm used to PHP's var_dump() and print_r() to check the value of a variable, how can I evolve to inspect things in Craft where Twig's dump isn't available?
Matt Stein's user avatar
  • 3,996
9 votes
2 answers

Is it possible to output the name of a Matrix Block?

I'd like to output the Names of Matrix Blocks. I know you can filter by block types e.g. {% for block in entry.myMatrixField.type('text, heading') %} {% if block.type == "heading" %} <h3>{{ ...
Natetronn's user avatar
  • 1,365
34 votes
3 answers

What's the best practice for upgrading a versioned Craft site?

It's thrilling to click The Button and watch Craft update itself. I take advantage of multi-site configurations with every deploy, and my practice thus far is to... Upgrade Craft in production. ...
Matt Stein's user avatar
  • 3,996
19 votes
4 answers

Can I run one Craft install on multiple domains and/or subdomains?

Is it possible to have one Craft install running multiple domains and/or subdomains? For example having the same Craft install running a blog Channel at and also an about Single at ...
Simon Kuran's user avatar
  • 3,005
104 votes
8 answers

What's the best practice for handling data migration and organization across development environments?

This issue becomes especially difficult when there are multiple environments, with multiple developers working on different features that affect the data structure. The holy grail is a git-style ...
Eric Ressler's user avatar
  • 1,139
22 votes
4 answers

How do I import data into Craft?

What's the best known way to import masses of data into Craft? Are there tools that support the migration of content/users from say XML, JSON etc.
Steven Grant's user avatar
  • 1,855
17 votes
1 answer

How do you list categories in a category group?

I would like to output a list of all the categories in a category group on the front end. How do I do that?
julzmon's user avatar
  • 941
29 votes
3 answers

How do I configure Varnish to work with Craft?

Has anyone successfully used Varnish with a Craft build? I'm trying to set up Varnish on my server but I'm very new at this. Can anyone share their config file or point me in the right direction? We ...
Carlo Laitano's user avatar
20 votes
1 answer

Transform Info from Handle?

Can I extract a transform's settings from its handle? I'm trying to avoid upscaling images using the workaround, and I'd like to set my transform handle dynamically within some conditionals. (see this ...
James Muspratt's user avatar

15 30 50 per page
282 283 284 285