Alright.. I've been trying to find an answer to this for days.. in IRC.. in documentation.. in articles about Display Suite.. and have had no luck. Whoever can answer this is my hero.
With the Display Suite module in D7, when I go to a layout, at the bottom I have a selection of pre-defined layouts. The Display Suite project page says I can "add custom layouts to my theme". HOW?!
I can't find any documentation, anywhere, on where I should place the tpl & css files, how I should name them, and how I should register them with Display Suite, so that they show up in that select box.
Example:
Display Suite includes a "3 Column 25/50/25" layout. I want to make a "3 Column 20/60/20" layout.
Comments
Hi, look at the ds.api.php
Hi, look at the ds.api.php file that comes in the module. The info is in that file.
Need some pointers
Could you point out where in the ds.api.php file? Thought you could take the default 2-col layout and css files and drop them into your theme and edit to make changes.
Jon
ds.api.php
The file can be found in sites/all/modules/ds/ ( display suite root dir )
Freelance Drupal developer, contact me if you want help on your Drupal project.
THANK YOU
Here's the relevant code:
what is wrong?
I tried this. But I get an error message only.
// Fuction name is ds_LAYOUT_KEY function ds_sch_ds() { return array( 'label' => t('Bartik DS'), 'regions' => array( // The key of this region name is also the variable used in // the template to print the content of that region. 'bartik' => t('Bartik DS'), ), // Add this if there is a default css file. 'css' => TRUE, ); }
Fatal error: Call to undefined function ds_sch_ds() in /web/wopecs/wopecs7/sites/all/modules/ds/ds.registry.inc on line 371
or
function ds_sch_ds() { return array( 'label' => t('Two column, 100px left'), 'regions' => array( 'left' => t('Left'), 'right' => t('Right') ), 'css' => TRUE, ); }
Fatal error: Call to undefined function ds_sch_ds() in /web/wopecs/wopecs7/sites/all/modules/ds/ds.registry.inc on line 371
What is wrong?
i solved the problem
Sorry!
The missed <?php tag.
-_-
should it not be
bartik_ds.tpl.php
instead ofbartik-ds.tpl.php
?( underscore )
Freelance Drupal developer, contact me if you want help on your Drupal project.
Check the documentation...
Adding Custom Layouts to Your Theme
Custom Layout with Drupal 8
Hi,
Anyone tried custom layout with Display suite in drupal 8. Or any suggestions how to do it. I tried with same D7 way but nothing happen really Nothing :(
thanks
Did you
Could you create for D8? I have the same issue!
Yes I made it. Do you have
Yes I made it. Do you have still problem or you solved it. If yes share some details may I help and sorry for late reply. I couldn't come to this page for long time :)
For D8 look here
https://www.drupal.org/node/2578731