Most Popular

1500 questions
4
votes
1 answer

Updating just a single content field from a plugin

I have a Task that is running through a collection of elements, moving some data from one field to another. The problem I am hitting (more and more with situations like this) is that in order to update just one field of an element, using the…
Mike Pepper
  • 4,391
  • 17
  • 26
4
votes
1 answer

getHeadHtml() not outputting CSS included with {% includeCss %}

I think there is a bug in the getHeadHtml function of craft. In the Documentation (https://craftcms.com/docs/templating/includecss) it says: Your CSS snippet will be output by the getHeadHtml() function. If you aren’t calling that function…
Tom Bauer
  • 1,327
  • 7
  • 14
4
votes
1 answer

Can Garnish be extended to allow plugins to use custom keyboard shortcuts?

For example, when editing an entry cmd + s saves the entry. Is there an easy way to extend Garnish to allow for my plugin to listen for custom keyboard shortcuts?
Jason McCallister
  • 2,336
  • 14
  • 27
4
votes
1 answer

Many db requests with relationship fields

I have a page with a lot of entries fields. They are awesome but that leads also to a LOT of db requests. Aside from caching are there some best practices to lower db requests on entries fields? For example my whole navigation is built with entries…
KSPR
  • 3,786
  • 2
  • 29
  • 52
4
votes
2 answers

Exclude "featured" entries from a "recent" entries {% for %} loop

Here's my current setup: Blog (Channel) - All of my blog posts will go here Blog Landing (Single) - This section only has one field - a Featured Articles Entries field that lets me select 3 entries from the "Blog" channel. Basically what I want to…
Tyler
  • 43
  • 3
4
votes
2 answers

Allow user to mark entry as favorite, starred, or saved for later

We're building a site with a recipes catalog and we'd like to allow logged in users to "star" an entry/recipe and then be able to view a list of their "starred" or "favorited" entries. Any suggestions on how to go about this?
Adam Ladrach
  • 301
  • 1
  • 8
4
votes
2 answers

Is there a thumbnail generator plugin for video assets?

I need a thumbnail image of a video which i upload as an asset. Instead of uploading an image manually I'd prefer craft to generate a thumbnail for me. Is there a plugin I didn't find or did someone find another workaround?
Marco Schuler
  • 620
  • 3
  • 13
4
votes
1 answer

How to use select dropdown with entries/saveEntry for an entry field?

How to use select dropdown with entries/saveEntry for an entry field? I have an entry with a field that is another entry, which I want to update with a form:
{{ getCsrfInput() }}
Marion Newlevant
  • 12,047
  • 22
  • 55
4
votes
2 answers

Dragging images inside of rich text editor

On Redactor's website, they provide a demo with an image that you can click on and drag around the editor to relocate it among the text. Video example from Redactor's website Trying this same functionality in the rich text editor in the Craft…
4
votes
1 answer

Show an entry is being worked on

Is there anything that will prevent an entry from being worked on by 2 editors at the same time?
Steven Grant
  • 1,855
  • 13
  • 27
4
votes
1 answer

How to output transforms for retina images from one upload?

I have a slide show that shows logos of different dimensions working well in HTML/CSS - the image output looks like below. I'd like to only upload one retina/hdpi image once for the entry where the asset is. I'd like to use image transforms to…
joomkit
  • 2,014
  • 1
  • 13
  • 24
4
votes
2 answers

Author List, Only Users With Entry

I am trying to show a list of users but only if they have created a post in a certain section... the code I am using isn't working as expected. Perhaps I have the syntax wrong when it comes to the user model Help would be greatly appreciated. {% set…
Alan Miller
  • 780
  • 5
  • 12
4
votes
2 answers

How do I tell Craft not to automatically crop user profile images?

When uploading user profile images, Craft forces you to crop it to a square. Is there a way to keep the images untouched instead?
Daniel
  • 43
  • 3
4
votes
1 answer

How to display success message using the Contact Form plugin

Kind of feel silly having to ask this but I cannot for the life of me get a success message to display after the redirect when the Contact Form submits. I just am not sure how to call it in the template view. I have tried various things like…
Rockwell Rice
  • 509
  • 1
  • 5
  • 16
4
votes
2 answers

Can you get the HTTP status code in twig templates?

I need a nice way to determine whether I'm on a 200 page. Basically anything other than a status page (404, 500, 403) in twig templates. I thought I could do something like craft.request.getStatus or craft.request.status but this didn't work. From…
Alec Ritson
  • 4,529
  • 1
  • 19
  • 34
1 2 3
99
100