Questions tagged [display-suite]
The "Display Suite" module allows to take full control over how the content is displayed, using a drag and drop interface.
310
questions
0
votes
1
answer
96
views
How can I work with Twig when using the Display Suite module?
I am working with Commerce 2 and Display suite, i want to add a field to the presentation that when a product has a boolean field valued to true, do not display a field and display other with twig.
...
0
votes
1
answer
26
views
How do I display the title of the entities to which the user has no access?
I created a new content type with entity references to standard pages. I am using the Taxonomy Access Control module to control the access to these pages.
When users view a node of that content type, ...
4
votes
1
answer
130
views
How do I set the display suite default region for newly created fields?
What needs to be done:
Newly created fields in any content type should go to the hidden region of the DS Layout.
Short background:
In our project we use the Display Suite module, and we have the ...
0
votes
2
answers
69
views
How to list Links/Attachments in sidebar second
When managing fields for a given content type in Drupal 9, I would like to be given the option to list all items of a given field (e.g. Links, Attachments, ... ) in a specific region (say, sidebar ...
0
votes
1
answer
167
views
Custom html.html.twig for a display mode
While using display suite in drupal 8.6.2 Is it possible to have a custom displaymode-html.html.twig that replaces the default
html.html.twig?
So far I have tried enabling the view mode dev hints in ...
5
votes
1
answer
2k
views
What should be used instead of raw filter?
Drupal 9 theming documentation indicates that the Twig raw filter is deprecated in favor of verbatim.
The ds-field-expert.html.twig template uses raw to render the input in the prefix and suffix field,...
0
votes
1
answer
17
views
Combine multivalue field rows with copy of same multvalue field
Having a list of pdfs using pdfpreview for image-preview I want to add an additional formatted text-field to this ouput.
That's why I've created a copy of this field with a different formatter (e.g. ...
0
votes
0
answers
23
views
Incorrect field of a content type in its display after migrating from a backup
The following two screen shots should explain the issue well:
Here I have a content type Poll, where the first field is Question with machine name title. However, in Managage Display tab, the second ...
0
votes
0
answers
53
views
Manage Display Format options not saving
I'm trying to edit a field label under Product Type > Manage Display. I expand the settings and type in "Product Name" and his "Update" and then scroll to the bottom and his "Save". When I expand the ...
1
vote
1
answer
184
views
Different forms per user role
I need to hide the description field from regular users when entering data, but the field should be visible to administrator users, which also can edit it. I used the Display Suite module to hide that ...
1
vote
0
answers
160
views
How to add a custom class or id to a custom display suite [closed]
I've created my custom display suite field and i it works ok, but i would like to add a custom div class or a custom div id,
here is my code
<?php
namespace Drupal\breadcrumbs\Plugin\DsField;
...
0
votes
0
answers
294
views
How to prevent page refresh after a button click?
I know this question is already asked, but my problem is different.
I have a code field created with Display Suite, that displays an audio player named AblePlayer, with a playlist of three tracks.
In ...
0
votes
0
answers
29
views
Display Suite Extra options not showing up
I installed and activated the "Display Suite Extra" module. But the menu point "Custom CSS classes" under "Manage display" of any content type is missing.
What else do I need to activate the Display ...
0
votes
1
answer
141
views
Use Display Suite token field in custom block type template
I have a custom block type, which uses its own theme template.
I have a display suite token field link_card_edit_block
It just uses HTML and tokens to create a link.
I want to use that field in my ...
0
votes
1
answer
123
views
Adding Display Suite fields to Search API results
Problem
I have some Display Suite token fields, and I want to include these and other entity fields in the Search API search results.
I also want to include the Search API Excerpt field in the ...
0
votes
1
answer
185
views
How do I identify what type of data or object I have? It's a referenced entity
I am new to Drupal but an experienced developer. I'm creating a DS field in which I will display a custom block chosen by the content editor. I have successfully gotten a referenced entity (two ...
0
votes
1
answer
287
views
Display Suite Token Fields in Custom Block Types
I want to add a Display Suite token field to my Custom Block Type.
I have a custom block type.
I created a token field with Display Suite
Entities: Block Content
Limit field *|* or link_card|* where ...
0
votes
0
answers
109
views
How to use DS layout on page generated with views?
I have a site where products are shown in different categories using taxonomies. I then use a view that emulates Drupal core's handling of taxonomy/term to generate those pages. Now, in only one of ...
1
vote
1
answer
39
views
Assigning new region in a display suite layout does not show contents placed inside newly created region
// rmch-content-2.tpl.php
<?php
/**
* @file
* Display Suite RMCH Two Column Header template.
*
* Available variables:
*
* Layout:
* - $classes: String of classes that can be used to style ...
0
votes
1
answer
49
views
How we can have layout options at time of node creation just like we select in panels and display suite
How we can add layout selection option of display suite or panel during node creation. Any solution available. The layout selection should be at the time of node selection.
0
votes
1
answer
89
views
Can Display Suite be used for "Show: Fields" as well as "Show: Content" to be able to rewrite field output?
I need to be able to adjust field output in view results but also want to make use of Display Suite for layout.
However, it would appear that Display Suite is only available for "Show: Content" and ...
1
vote
1
answer
722
views
Theme Preprocess Conditional Field Display
Looking for a way to preprocess two fields. I am trying to hide Field 1 from display if Field 2 has value.
If Field 1 has value and Field 2 has value display Field 2 only.
If Field 1 has value and ...
0
votes
1
answer
716
views
Manage Display Field Label not changing: inline does not work
I have the same problem as question 212176 and discovered it has to do with CSS.
I have 2 (local) sites both with module ds enabled. I configured in both a field where I want the label and the value ...
0
votes
0
answers
45
views
How do I reorder page elements placed with Display Suite?
I want to change the stacking order of a certain page of a website of a client of mine. It's quite simple what I really want. You can check the screenshot. The website's current Drupal version is 7.59....
2
votes
1
answer
672
views
Creating a Display Suite Custom Layout
I'm using Display Suite for my website and I want to add a couple layouts to Display Suite, to apply to some pages. I have checked out how to add custom layout to Drupal Suite with google, Stack ...
1
vote
1
answer
16
views
Prevent page creation for a published custom content type
I have a Drupal 8 custom content type that is used in views only. I would like to prevent this type from creating a web page for content that is published.
0
votes
0
answers
2k
views
Programmatically render user edit form with form mode [duplicate]
I can't figure out to render the user profile form with a custom display mode. I did search the forum and internet and it seems that this piece of code should work:
function ...
0
votes
1
answer
70
views
Full content view mode per role
I've looked around but didn't find the right solution. In D7.5x I would like to create different view modes (of Full Content) per role. I am using Display Suite.
The situation should be like this: I ...
1
vote
1
answer
989
views
Conditionally display a field
On my "teaser" view mode I want to display my Image field but if the Image field is empty I want to display my Title field instead.
I have tried using hook_preprocess_node but it appears that this ...
0
votes
1
answer
128
views
Where does the value $ds_content come from in display suite templates?
After updating to the newest version of display suite I noticed that in display suite ds-reset.tpl.php the value for $ds_content is now blank.
<?php
/**
* @file
* Display Suite reset template.
...
1
vote
1
answer
3k
views
Displaying current date on views
Is there a way to display the current date on views? I just realized that I couldn't use global tokens nor could I get custom date created on Display Suite on views.
0
votes
2
answers
1k
views
Display Suite vs. EVA for displaying a view as field
I want to display a specific view as a field in nodes. It’s the same view for all nodes of this type, making use of the contextual filter "Content ID from URL".
I found two solutions using ...
0
votes
1
answer
101
views
Export node display with Features not taking in account format of fields
I'm trying to export a node display with features and I already created the feature with the display and imported it to another site.
The problem is that the display has some differences, mainly in ...
0
votes
2
answers
63
views
How can I remove only submitted time from node view?
I only need to remove the published time from the submitted by field while viewing the node. Is it possible to do with display suite or there are other different approaches?
1
vote
1
answer
568
views
Add code to <head> for specific content type
What would be the best way to add code inside the tag of specific content type?
Display Suite is being used for layout and we are using a custom theme. Have created html.html.twig. If I add ...
2
votes
0
answers
239
views
How to define CSS for Custom Display Suite Layout
I have added a custom layout for Display Suite on Drupal 8. Everything is working except the CSS for the custom layout is not working.
This is my layout in my theme folder:
mytheme.layouts.yml
...
0
votes
1
answer
589
views
Display Suite Custom Wrappers and Custom Classes Tabs Not Appearing in Manage Display
I am using Display Suite layouts for some of my pages. I want to add in some custom classes for the regions. However, the custom classes and custom wrappers tabs are not appearing on the Manage ...
0
votes
0
answers
276
views
How I can I have a separate variation field in Commerce 2?
I have a Commerce 2 website, where my product display page is a two column layout through display suite.
In 1 column I would like to display the picture of the product variation and, in the other ...
3
votes
0
answers
812
views
Creating custom 'Display Suite' 'Bootstrap layouts' layouts
I am using the bootstraps layouts module with display suite to provide bootstrap styled layouts for a bootstrap themed Drupal 8 website.
Is there a way to create custom layouts based on the '...
0
votes
1
answer
101
views
is there a way to hide a "custom field" in edit mode Drupal 8?
I have a form with 5 custom fields. I would like to hide a couple of fields based on the view mode in the back-end while the user is editing the form. Right now you can easily hide the field in the ...
1
vote
1
answer
49
views
Display suite, two layouts for the same node?
I'm using display suite with nodeblock and I'd like to have a different layout for the block than the main page. How can I do this?
1
vote
1
answer
398
views
How do I programmatically enable a view mode?
Let's say I have created a new view mode with DS. How can I activate it programmatically?
I want to achieve this because I'm doing an export with features but, despite the Features module exports DS ...
0
votes
1
answer
58
views
How to keep Display Suite CSS classes in code?
I'm using DS in my D7 project along Features, so I've been able to keep all my new DS layouts, CCK, etc. in code, by generating a custom feature.
All good there... until I had to add some custom CSS ...
3
votes
2
answers
3k
views
How to add code logic to Display Suite fields without PHP in Drupal 8? Twig?
Using Display Suite in Drupal 7 I can easily add PHP logic to any custom Display Suite Field. In Drupal 8 PHP is not allowed. How can I program logic in Display Suite fields in Drupal 8?
As an ...
0
votes
0
answers
135
views
Display suite extra expert mode field classes not working on entity form fields
I'm using display suite extra and trying to ad classes to fields via expert mode, but it's not working, I tried both teaser and full content, am I missing something here?
Using boostrap theme and ...
1
vote
1
answer
273
views
hook_view, hook_theme and Display suite
My module adds further content to a specific node bundle, in the "view" phase, in the following way:
hook_view (under the right conditions) adds these "contents" to the node display array
hook_theme ...
0
votes
1
answer
227
views
How do I stop content overlap with Display Suite on mobile/narrow screens?
Building a site where sugar glider breeders and vendors can list their businesses and wares and find informational articles, links to exotic vets, and more.
The site is built on Drupal Core 8.2.7 ...
1
vote
0
answers
53
views
Speed up AJAX loading on manage display page when moving fields among regions
When I'm switching my fields into different regions, it takes at least 20 seconds to make it change. I'm not able to change any other field while I wait. The only work around to this was to disable ...
1
vote
1
answer
718
views
Custom display suite template
I'm trying to understand Drupal 8 theming, since I want some custom layouts for some of my pages. I've tried Display Suite module, and it gets me some of the way, but non of the display suite layouts ...
0
votes
1
answer
108
views
Display the username in a custom block
I'm using D7 and I have a custom content type (Client) and I have a custom select list field for the User entity displayed in a custom block.
I have a custom display layout for the Client content ...