André Elvan
  • Member for 7 years, 7 months
  • Last seen this week
Can I use GraphicsMagick with Craft CMS?
1 votes

No, Craft only supports GD and Imagick, not Gmagick (which would be the PHP extension that interfaces with GraphicsMagick). The underlying PHP library, Imagine, actually does, so I guess it would be ...

View answer
Craft Equivelent of EE addon CE Image Bulk Tag?
Accepted answer
1 votes

You can do the same thing using the Retcon plugin for Craft. Have a look at the wiki entry for the transform filter for more details.

View answer
Imager Transforms, Cacheing and S3
Accepted answer
1 votes

Imager will always create and store the transformed images locally in your imagerSystemPath, even if you choose to upload and serve them from an external storage. The files in that folder acts as the ...

View answer
.limit(1) on asset field loop is effecting another loop on same page
Accepted answer
1 votes

Yes, this is actually the intended behaviour, and one that changed when going from Craft 2 to Craft 3. You can read more about it in the Changes in Craft 3 article in the docs. projectImages in this ...

View answer
Uploading assets to different locations based on environment
1 votes

AFAIK, you can't change the type of your volume based on your environment. But if having a separate S3 account/bucket for dev could work for you, you can configure this with a volume.php config file. ...

View answer
How to use `{% cache %}` and `{% paginate %}` together?
1 votes

Yes, the database query you'd want to cache is this: {% paginate craft.entries.section('employment').endDate('>= ' ~ now).limit(10) as pageInfo, pageEntries %} So to get the benefits of caching, ...

View answer
How to implement mailchimp plugin to target different mailists?
1 votes

If the plugin in question is my MailChimp Subscribe plugin, you can easily target different lists by adding a hidden field called lid to your form with your list ID: <input type="hidden" name="lid"...

View answer
Display children's order numbers
Accepted answer
1 votes

If you're getting all the descendants in the for loop, you can use loop to get the index of the current iteration: {% for chapter in entry.descendants %} <div class="part"><span>Part {...

View answer
How do I order by _entry type_ when looping through entries in a template?
1 votes

You could use my Preparse Field plugin, which let's you run twig code when an entry is saved, and saves the result of the twig as plain text in the field. If you just wanted to sort alphabetically by ...

View answer
Search for related entries based on tags
Accepted answer
1 votes

I don't think the accepted answer actually works, order: 'score' only works if you are doing a search. I've made a plugin called Similar that orders by the number of relations to other element types,...

View answer
Can I set a JS variable to a Twig output tag?
1 votes

You probably just need to wrap the twig output in a string, if that's what you need in your javascript. Try: <script type="text/javascript"> var gameTags = "{{ craft.tags.group('gameTags') }}"...

View answer
RedactorStyles Plugin Not Working
1 votes

Craft 2.3 upgraded Redactor to version 10, which comes with a completely new API for plugins. This broke RedactorStyles which relied on the old API. I've updated the plugin now, so downloading ...

View answer
Can I use translated properties for URL formats
1 votes

It works for me to use {type|t}/{slug} as an url format. Just make sure you make the translations before you save the entry (in the translated language). Or go back and resave the entries. The url is ...

View answer
Cannot access plugin controllers when plugin does not have a "cp section"
1 votes

If you don't want to give the user specific access to your plugin, I think the only solution is to allow anonymous access to the controller action. But of course, this would make the controller ...

View answer
Convert textfield to be used in html class or id?
Accepted answer
1 votes

You can do this with the Luke Holder's Inflect plugin. Which method to use would depend on how you want the resulting text to look. I'd use {{ myTextField|slugify }} to get a string that looks like ...

View answer
Search form generates blank page
Accepted answer
1 votes

Templates starting with an underscore character is by default denied direct access in Craft (resulting in a 404 not found error). I guess that renaming your template to "results" should fix it.

View answer
How should I setup my .htaccess file
1 votes

Here's what I'm using: # Remove the www from the URL RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] # Exclude root files RewriteCond $1 !^(favicon\.ico|favicon\....

View answer
Passing an array on Template Render
Accepted answer
1 votes

Yes, you do it with the setRouteVariables mathod on UrlManager, like this: craft()->urlManager->setRouteVariables(array( 'variable' => array( 'name' => 'silvanus', 'office'...

View answer
How can I get the last Matrix block of a certain type?
1 votes

I've come up with this very "manual" approach, which works ok: {% set lastTextBlock = -1 %} {% for block in entry.contentBlocks %} {% if block.type=='text' %} {% set lastTextBlock = loop....

View answer
Structure entry position in url
Accepted answer
0 votes

If your structure only has one level, you can use a title format like this: Number {{ craft.entries.order('lft desc').positionedBefore(object).total()+1 }} published in {postDate|date('F')} {postDate|...

View answer
Is there a way to override locale data?
0 votes

I don't think you can override that, but I'm not 100% sure. But, there's always the option to run the replacefilter on the output from currency: {{ 344552.32 | currency('GBP') | replace('£UK', '£') }}...

View answer
1 2 3 4
5