how do i specify a library in the views UI?
where do i store the libraries on disk?

thanks

Comments

laurencefass created an issue. See original summary.

hardik_patel_12’s picture

Hi laurencefass,

We can add libraries in module or theme using modulename.libraries.yml or themename.libraries.yml.

suppose there is custom module called student , so to add library we have to create stuent.libraries.yml.

In stuent.libraries.yml we have included student.js and student.css ike this,

class:
version: 1.x
js:
js/student.js: {}
css:
theme:
css/student.css: {}

so suppose you want to include student.js and student.css in your views , you have to add library in views UI like this student/class.

where student is modulename and class is library name

same for theme, suppose there is custom theme called xyz , so to add library we have to create xyz.libraries.yml.

In xyz.libraries.yml we have included xyz.js and xyz.css ike this,

abc:
version: 1.x
js:
js/xyz.js: {}
css:
theme:
css/xyz.css: {}

so suppose you want to include xyz.js and xyz.css in your views , you have to add library in views UI like this xyz/abc.

where xyz is themename and abc is library name

I hope now it's clear

hardik_patel_12’s picture

Status: Active » Closed (works as designed)