File Field related issue / How to hide file size information?
-
28-02-2021 - |
سؤال
I used CDN option while creating my sub-theme. I find less and sass things pretty confusing since I am someone who haven't mastered the css yet. What I have found out so far is:
- I can edit some styling copying some css lines from "/libraries/bootstrap/css/bootstrap-theme.css" to "subtheme/css/style.css" file.
What I want to do is to remove / disable / hide the file size information which shows up next to the file link which is the product of 'file-field' of Drupal. This is viewed using bootstrap's table styling / template or whatsoever you call it.
Is this something that should be accomplished using css or it is a template file or maybe it can only be modified in module?
المحلول
Copy your parent's theme file-html.twig and place in it your subtheme's /templates folder.
Remove line that has {{ file_size }}
, example:
<span class="file-size">{{ file_size }}</span>
Flush cache.
لا تنتمي إلى drupal.stackexchange