Justin Dekkers
  • Member for 6 years, 6 months
  • Last seen more than 2 years ago
Navigation to URL
Accepted answer
1 votes

Your syntax is wrong. You don't need to put "('service')" inside your twig code plus you don't need to enter your siteUrl. If you fill the href with /services it should work like supposed to. If ...

View answer
How to define section parent page?
1 votes

You have to select the "level" in the structure. Im guessing the products are always on level 4? If so you could try this: {% set entries = craft.entries.section('yourSectionHandle').level(4) %} {% ...

View answer
Update content inside cache tag
1 votes

Because your content is cached it "downloads" your website so it loads quick. This can be fixed by disabling cache to users that are logged in or maybe even certain users. This way you "bypass" the ...

View answer
How do you use 'if' to stop an empty Matrix block from displaying?
Accepted answer
1 votes

If a Matrix field / block is empty it won't output at all but you can try checking the length in an if statement like: {% if entry.modelDataType1 | length %} // matrix content here {% endif %}

View answer
Can't get Frontend Search to work
Accepted answer
1 votes

Inside of the <form action="{{ url('search/results') }}"> You define which page should be redirected to when the search form is submitted. "search/results" would go to the search folder looking ...

View answer
Another gallery question
1 votes

You can set an array and order them by random. {% set gallery = craft.entries.section(['galleryA','galleryB','galleryC']) %} Then you have to display them by random using .order('RAND()') So your ...

View answer
Search/return entries with custom field length less than 200
1 votes

I'm not 100% sure what you are trying to achieve but If its because all the others would be to big for whatever you're building. You could use Hacksaw to fit all your text. https://github.com/...

View answer
Can SEOmatic pull from a Category Field to fill Entry - SEO Keywords or SEO Description?
1 votes

Have you made a field that uses SEOmatic? If not you should make one and put it on the page you would like to use it (best would be all pages). Once you've done that make sure you dont have any other ...

View answer
Get Entries From Any Section Matching a URL segment
1 votes

If I understand you right all you need is: {% for section in allSections if craft.request.getFirstSegment() == 'jobs' %} {# other code here #} {% endfor %} You can give conditions to your for ...

View answer
How to skip fragments of code in Matrix?
1 votes

Your question is rather vaguely but if I'm right: You could put an "if" statement around your "h1" element like, {% if loop.first %}<h1>This text will only be used if the lightswitch is active&...

View answer
Outputting supertables within a matrix
Accepted answer
1 votes

I think your output is wrong. Looking at your code and explanation, {% for row in entry.hgroup %} should be: {% for row in block.hgroup %} Same goes for {{ entry.heading }} This should be: {{ row....

View answer
image transform on reference tag
1 votes

I think you are forgetting to loop through the images. If not could you be clearer in your question? It should work like this: {% for image in entry.imageHandle %} <img src="('{{ image....

View answer
Which is best practice, SET or FOR?
0 votes

Personally I would pick the For loop to keep my code look equal plus you are looping over an entry so in my opinion you should use FOR

View answer
Craft license and develop a website locally?
0 votes

Any non-public domain will do the job. Just hit Upgrade in your CP then you'll get a option to use it for free as long as you work on a non-public domain so localhost works fine. When you transfer ...

View answer
1
2