Hello all,
This is a Moodle development question, and I searched as best I could here and don't see any answers. I am sure this is a beginner question, I am a beginner when it comes to Moodle development, so hopefully I am not missing something completely obvious. Feel free to point me to another post if there is one on the topic.
I was working my way through the blocks tutorial (http://docs.moodle.org/en/Development:Blocks) and was trying the Eye Candy section. I can get the example code working, adding the alert, but I am not having any luck with other CSS changes. Several things:
- Can anyone provide an example of an overloaded html_attributes function that modifies or uses a few more attributes? For example, suppose I wanted to use background-color:yellow. How would that be included in the associative array?
- A note about the example code in the tutorial: the html_attributes example does not include a call to parent::html_attributes(), but the description of html_attributes() in Appendix A does. Is one way "more correct" than the other?
- Lastly, is setting up the look of my block as simple as getting the array initialized correctly in the html_attributes function, or are there other changes I need to make (e.g. weblib.php)? I searched for other block files that use html_attributes but it didn't show up anywhere except my file and the block_base class. Perhaps people don't customize?
Thanks in advance,
Carvell