Questions tagged [layout]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
1answer
154 views

pass data to _layout?

I have a field call "scripts" to house scripts like a marketo form script. This gets added in an entry template, but I need to pass this to the layout (if there is something in the field) and render ...
1
vote
1answer
403 views

SEO titles/descriptions for tags and archive pages

I have a blog setup with a Categories, Archive and Tags. In my _layout template I've been using the following to pull in SEO titles from fields, or Page/Category Titles is that's not been defined. {%...
1
vote
1answer
137 views

How to handle client expectations regarding page building and layout within Craft

I love Craft CMS and use it for nearly every site I build. There isn't a better tool (in my opinion) for managing custom data. And using a matrix field as content builder solves the majority of my ...
2
votes
1answer
19 views

How to slightly alter _layout for one specific page?

I have a _layout which includes a contact button: {% include '_contact-button' %} This creates a small contact button in the bottom right of every page that when clicked expands into a contact form. ...
1
vote
1answer
55 views

Exclude a block from appearing on a specific page

I'm currently trying to make my navigation be not included on my index page due to my loading a different style of page - but - include it on every other page. My current layout looks like so: ...
1
vote
2answers
550 views

Split entries in columns

I'm trying to build a feed of entries in a column grid. Something like that: <div class="column"> <a class="entry">First entry</a> <a class="entry">Fourth entry</a> &...
1
vote
1answer
340 views

Using Structures instead of Singles

Has anyone ever tried using Structures instead of Singles? I'm developing something that's kind of like multiple sites in one, they share the same central design, just with content differences and a ...
1
vote
2answers
383 views

Copy the Entry Type along with its field layout

For a current project, I am attempting to automate the creation of a section. I am using a default_section as the base of all the others. This section will contain a couple of entries, and a couple ...
1
vote
1answer
226 views

Output a Twig tag within another Twig tag

I have a Matrix with a block for a contact form. I have a field for the email recipients. But the output doesn't work. How can I render/output the output a tag within another tag, like this? <...
1
vote
2answers
1k views

Craft Neo – childs Output

I have a question. How can I output the Childs from a Neo (Neo Plugin) Block? With this code, i get the output for all level 1 blocks but i don't get a output for the deeper levels. And how can I ...
3
votes
1answer
409 views

Recommended Structure - One Site with Pages With Totally Different Layouts?

I've got a site with one base URL that is run on one Craft instance. The site is for a yearly event and each year the header / footer / body page elements / design are different. However, we want to ...
1
vote
1answer
561 views

Ajax layout sample

I am just learning how to use this CMS and I am able to get basic things done but I have no idea what a ajax layout will look like. I have few pages in old system which fetch info using ajax calls (....
2
votes
1answer
2k views

Trying to achieve a row column layout with batch

I tried to code an output in twig that should look the following ( 2 columns in one row), i figured that i will need the batch function <div class="row"> <div class="col-sm-6">...
2
votes
2answers
1k views

Send a block… into a block?

I'm fiddling around with Twig and CraftCMS, trying to create a component-based structure... of sorts. All good so far, except this one thing I got stuck on. Here's an excerpt from my main layout: &...
1
vote
1answer
86 views

Re-usable Field Layouts

I've Googled & searched on here, but have not been able to find the answer I need. I come from using Advanced Custom Fields in the WP environment, and one feature that was great about ACF was ...
1
vote
2answers
863 views

What are best practices for using Matrix fields to establish a grid layout

I am using a Matrix field for content blocks like heading, text, images, ... similar to the HappyLager demo site. Now I would like to combine this with common CSS grid systems (e.g. from Bootstrap, ...
2
votes
1answer
560 views

How does one achieve drop-left or drop-right image position?

How is one to achieve the layout visualised by Craft's drop-left and drop-right icons? I feel dumb asking but I don't know of any way to have a floated image stick to the bottom of its sibling text ...
0
votes
1answer
146 views

Is it possible to load different “_layouts” with ajax for certain pages?

I've followed this tutorial by Zack Spear. It leaves your website with a header and footer that stay constant while the body of the page is loaded in through AJAX when you change pages. Is it ...
2
votes
2answers
200 views

Determine a layout based on column number

Okay, I want to create a Matrix based layout like this: | x | x | x | | x | y | | y | x | X is a 1/3 column and Y is a 2/3 column. I want to activate the size Y with a lightswitch. The ...