Questions tagged [layout]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
78 views

How to dispatch equally entries from different channels?

I have entries from two different channels, where each channel has a different total of entries, and I want to display them equally by batch. Example: Channel #1 | Channel #2 | Channel #1 Channel #1 | ...
Romain P.'s user avatar
  • 1,818
2 votes
1 answer
418 views

Whats crafts best practice when having to reuse fields

I'm looking for a way to do rapid development (i.e. not manually using the UI to create one field at a time). So if you have a page which requires multiple similar fields you can quickly add them? ...
Wally's user avatar
  • 333
2 votes
1 answer
205 views

Custom Field layouts

So many times im at odds with the layout of Craft Fields in the CMS, where from a usability and user interaction stand point I feel the layout can be way better and even mimic the front end result. ...
Wally's user avatar
  • 333
0 votes
1 answer
51 views

How to get field widths when using getFieldLayout()?

I'm trying to show all my Channel's fields on front end, as they are shown on the CP: {% set section = craft.app.sections.getSectionByHandle('handle') %} {% set fieldLayout = section.getEntryTypes[0]....
Romain P.'s user avatar
  • 1,818
0 votes
0 answers
102 views

Split categories by levels / List categories merged by name

I have a scenario where I need category levels (4 levels) split in different sections of the page, also some categories have the same name, I explain: I need to list entries based on a category group ...
user15280052's user avatar
2 votes
1 answer
370 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 ...
Danielle Frappier's user avatar
1 vote
1 answer
828 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. {%...
sarah3585's user avatar
  • 899
1 vote
1 answer
220 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 ...
mjr's user avatar
  • 1,405
2 votes
1 answer
20 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. ...
patrick.altair's user avatar
1 vote
1 answer
110 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: ...
JMKelley's user avatar
  • 1,396
1 vote
2 answers
903 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> &...
Malte's user avatar
  • 215
1 vote
1 answer
461 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 ...
Chrish's user avatar
  • 35
2 votes
2 answers
588 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 ...
Thomas Claessens's user avatar
1 vote
1 answer
376 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? <...
The Frog's user avatar
  • 119
1 vote
2 answers
2k 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 ...
The Frog's user avatar
  • 119
3 votes
1 answer
456 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 ...
dpayne's user avatar
  • 659
1 vote
1 answer
673 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 (....
Subrato M's user avatar
  • 109
2 votes
1 answer
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">...
HendrikEng's user avatar
  • 1,064
2 votes
2 answers
2k 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: &...
Ole's user avatar
  • 245
1 vote
1 answer
97 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 ...
Besim Huskic's user avatar
1 vote
2 answers
998 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, ...
Lars Bilke's user avatar
2 votes
1 answer
639 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 ...
Jonathan Schofield's user avatar
0 votes
1 answer
160 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 ...
patrick.altair's user avatar
2 votes
2 answers
250 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 ...
KSPR's user avatar
  • 3,786