Youtube Rest API response details
Here, we give exact response from youtube apis.
April 10, 2020
Suppose you have a view, and you have configured your display as a table. Drupal provides no way to configure a css class for the table. And, it shows an ugly table. I was using bootstrap css, and they have some really awesome table classes. Lets see how we can add that custom class to a table view.
See the earlier table:
So, there is no way on the drupal configuration to do that. We need to do little bit of twig file tweak. First, we need to see from which twig file, the output is being rendered.
debug: false
Now refresh the page, and inspect the html in chrome. You will see from where the html is coming. In my case, it was showing the view name as:
/core/themes/classy/templates/views/views-view-table.html.twig
Copy that twig file in your theme’s template directory. And, edit that file. You will see a section on top where classes are being set, see below:
set classes = [
'views-table',
'views-view-table',
'cols-' ~ header|length,
responsive ? 'responsive-enabled',
sticky ? 'sticky-enabled',
]
In bootstrap, the simple class for the table is: table Simply add that class in the list, and nothing else. See changes below:
set classes = [
'views-table',
'views-view-table',
'table',
'cols-' ~ header|length,
responsive ? 'responsive-enabled',
sticky ? 'sticky-enabled',
]
Save the file. Now, clear the cache. And, refresh your page. You should see the expected changes in your html.
See the bootstrap version of the table view
Here, we give exact response from youtube apis.
If your youtube video looks like:https://www.youtube.com/watch?v=g0kFl7sBdDQ…
Problem Statement I developed a simple ReactJS application where I have used…
I have a custom content type, and there are around 2000 number of nodes in my…
hook_cron() suggests to put tasks that executes in shorter time or non-resource…
The problem comes while using FTPS. When developer uses login method of this…
In this post, we will see some of the frequently used concepts/vocabulary in…
System design interview is pretty common these days, specially if you are having…
Introduction You are given an array of integers with size N, and a number K…
Graph Topological Sorting This is a well known problem in graph world…
Problem Statement Given a Binary tree, print out nodes in level order traversal…
Problem Statement Given an array nums of n integers and an integer target, are…