Most Popular
1500 questions
4
votes
1 answer
Syntax for using 'not'?
I want to show a list of entries that excludes two or more specifically by id.
This works:
{% for entry in craft.entries.section('boardOfDirectors').id('not 12') %}
This does not:
{% for entry in craft.entries.section('boardOfDirectors').id('not…
Britchie
- 215
- 2
- 9
4
votes
3 answers
Get entries by category value from within plugin
I need help.
I want to get entries based on multiple field search. It works for basic field types like selectbox or plain text but I can't get it to work with Categories Fields.
The field size is a selectbox field and works good.
The color is a…
Nobster
- 93
- 4
4
votes
1 answer
How do you create dynamic error pages?
I want to have one template handle all of my error pages (instead of creating 404.html, 500.html, &c.).
Bryan Redeagle
- 4,065
- 13
- 27
4
votes
2 answers
Website structure with Craft
This is my first try at Craft, was planning on replicating a current site as practice, had a question about the sites architecture.
I have a Brands page:
Brand/Company info
-Brand product line
--individual products within that line
What would be…
fidel
- 123
- 6
4
votes
2 answers
How do I create database tables for a craft cms plugin on install?
I am absolutely new to craft plugin development and could not find any documentation on creating database tables specific to a new plugin. How are new tables created when a plugin is installed?
I am browsing through the source code for the…
Amit Erandole
- 338
- 2
- 12
4
votes
1 answer
How to add/link an entry to an object using PHP?
I'm building a plugin to add users to the system with set properties (like company) and permissions. The user form works with an "Entries" field and works with connected source section entries and works fine. Now when I receive the objects in my…
pythic
- 569
- 2
- 9
4
votes
1 answer
How to serve Craft with Caddy server
Caddy seems to be an easy to use alternative to established web servers. How does the Caddyfile look like for a Craft site?
Lars Bilke
- 754
- 5
- 11
4
votes
2 answers
CSS is not loading on staging server
I'm quite new to server config, so this might be a simple mistake. I have a local environment setup on my computer that works just fine. I uploaded my project to my staging server at AWS and the only thing that loads is the index.html in my craft…
Moin Qidwai
- 590
- 5
- 16
4
votes
1 answer
Limiting the Upload Location for assets in a Matrix Block
In the Dashboard, while editing the settings of a Matrix Block — the instructions for setting Upload Location for an Assets field says Note that the subfolder path can contain variables like {owner.slug} or {owner.author.username}.
To what does…
maxfenton
- 97
- 5
4
votes
1 answer
Mobile app authentication
We're trying to use Craft as a CMS for a mobile app and to accomplish this we need to convert entries to JSON. We use the Element API plugin for this and it works like a charm.
The problem is that we don't want certain content to be visible to…
Joris
- 130
- 5
4
votes
1 answer
Element API locale
Is it possible to get the right locale based on url? For instance
http://example.com/entries.json gives english content while http://example.com/no/entries.json gives norwegian content? Or can I somehow specify different locales in criteria or some…
Spoeken
- 327
- 3
- 10
4
votes
2 answers
MSSQL Support for Craft?
Is there a MSSQL support for Craft CMS?
Or any plugin that can help to connect to a MSSQL database?
Thank you!
Nancy Lussier
- 41
- 1
4
votes
1 answer
How can I iterate more than 100 blocks in a matrix field for loop?
I am looping through a matrix field and it appears to stop looping when the index reaches 100 but I have more than 100 blocks here. How can I loop through the remaining blocks?
{% for block in entry.myMatrixField %}
{{ loop.index }}
{% endfor…
user243
- 161
- 3
4
votes
1 answer
How to block direct access to templates (hiding templates)
How can I prevent people accessing templates directly that are only used as includes for instance?
I read that I could add an underscore ie _example.html,but then the include stops working.
noregt
- 1,062
- 9
- 16
4
votes
1 answer
Redactor video plugin not working
I've tried to integrate the video.js plugin for Redactor. It allows me to insert a YouTube embed (as expected) but the iframe code is stripped out on save. Using the latest Craft 2.5 build. Anyone experienced the same? Solutions?
Shealan
- 264
- 2
- 7