Thanks.
I hope that helps and don't forget to purge caches
Best regards
Mariela
Hi Mariela,
Thank you very much for your contribution.
I tried to type your CSS into my Single Template like below:
Inside table:
<td class="nolink">image</td> ....... At the bottom:
<style> .nolink {cursor:not-allowed !important; point-events:none !important} </style>
Then I tested it on my Mac, but not working.
I did clean Cache first.
Did I miss something?
Have you got a chance to test it on a Mac?
Thanks.
Hallo William,
styles are normally defined at the top of a HTML page within the head section and then used in the body section where the table is defined.
I am no Mac user so I have not tested this on a Mac setting. However I have tested it in Opera, Chrome, Edge, Firefox and works everywhere.
So my template looks something like this (I have shortened the table to show only the first row):
I hope that helps
Best regards,
Mariela
It’s nothing to do with a Mac. CSS can’t be entered directly into a database template.
The database activity has a CSS template where you can add in CSS that only affects that activity. It’s with all the other templates: List view, Single view, Advanced search, Add entry, RSS template, CSS template.
Sorry to disagree with you John. You can definitely enter CSS in the single template in a style tag if you first disable the editor and then add the style Tag at the top in what in a normal HTML page the Head section is, like you see on my picture. You may also try to add it in CSS template but in my case affected all other database templates, which was not what I wanted... so I only added it to the single template and it works "as designed".
Hi John,
Yes, in most cases, we can enter CSS or Javascript inside any template, either at the top or at the bottom. They work the same as in the CSS Template or in the Javascript Template.
However, I couldn't get Mariela's CSS to work on my Moodle3.9x, nor on Moodle cloud. I tried to add her code in the Top / the bottom of the Single template / the CSS template. I tested on Windows PC and Mac, I cleaned the cache before each test.
Hi Mariela,
I suspect that I didn't type in your code correctly. Could you please share your preset zip file here?
Thank you.
Yes, in most cases, we can enter CSS or Javascript inside any template, either at the top or at the bottom. They work the same as in the CSS Template or in the Javascript Template.
However, I couldn't get Mariela's CSS to work on my Moodle3.9x, nor on Moodle cloud. I tried to add her code in the Top / the bottom of the Single template / the CSS template. I tested on Windows PC and Mac, I cleaned the cache before each test.
Hi Mariela,
I suspect that I didn't type in your code correctly. Could you please share your preset zip file here?
Thank you.
Hi William,
please find attached the preset. Also please bear in mind, that this is a work in progress, I am experimenting with some stuff with the database activity.
So far this works for me... I hope it will also work for you. I would also be happy if others help to improve this preset
Best regards
Mariela
please find attached the preset. Also please bear in mind, that this is a work in progress, I am experimenting with some stuff with the database activity.
So far this works for me... I hope it will also work for you. I would also be happy if others help to improve this preset
Best regards
Mariela
Hi Mariela,
Thank you very much for your preset. it works!
It was my fault, I didn't type in your code correctly. I missed the last ";".
Thank you very much for your preset. it works!
It was my fault, I didn't type in your code correctly. I missed the last ";".
Now, the code is:
<style>
.nolink {cursor:not-allowed !important; pointer-events: none !important;}
</style>
I tested it on my Mac, works straightaway.
I also tested the code at the bottom of the Single Template, which works as well 😀.
Thank you again for your contribution.
Perfect! Glad it did