🇮🇳India krunalunadkat Pune
🇮🇳India krunalunadkat Pune
Hi @marcjana_84,
You can try using below solution,
1) Add this in .theme file in custom sub theme
<?php
function HOOK_preprocess_file_link(&$variables) {
if (isset($variables['file'])) {
$variables['fileLinkDisplay'] = [
'fileSize' => $variables['file']
->getSize(),
'fileSizeFormatted' => format_size($variables['file']
->getSize()),
];
}
}
?>
2) Add this to custom sub theme
-> themes/custom/THEME_NAME/templates/field/file-link.html.twig
{{ fileLinkDisplay.fileSize }} and {{ fileLinkDisplay.fileSizeFormatted }} will be available in your template.
In twig file we can use as per below:-
<span{{ attributes }}>{{ icon }} {{ link }} {{ fileLinkDisplay.fileSize }} {{ fileLinkDisplay.fileSizeFormatted }}</span>
Thanks
🇮🇳India krunalunadkat Pune
🇮🇳India krunalunadkat Pune
Hi @admin_juhisingh,
#4 Is working fine for me
Thanks
🇮🇳India krunalunadkat Pune
🇮🇳India krunalunadkat Pune
🇮🇳India krunalunadkat Pune
🇮🇳India krunalunadkat Pune
Hi @senzaesclusiva,
I've found one solution by myself.
1) Add a library to bootstrap_barrio_subtheme.libraries.yml
# Custom front page
custom_front_page:
css:
theme:
css/front.css: { weight: 1000 }
2) Use hook_page_attachments_alter in .theme file
/**
* Implements hook_page_attachments_alter().
*/
function bootstrap_barrio_subtheme_page_attachments_alter(array &$page) {
if (\Drupal::service('path.matcher')->isFrontPage()) {
$page['#attached']['library'][] = 'bootstrap_barrio_subtheme/custom_front_page';
}
}
Now it's working fine for the front page only.
Thanks
🇮🇳India krunalunadkat Pune
Added configure entry to the *.info.yml
🇮🇳India krunalunadkat Pune
By using this patch user not able to submit without uploading CSV file. CSV file is required to submit the form
🇮🇳India krunalunadkat Pune
🇮🇳India krunalunadkat Pune
🇮🇳India krunalunadkat Pune
Please use attached patch there is issue with batch process because of PHP version upgrade