When I put some directory into a new block directory, the moodle doesn't load it...
/moodle/blocks/myblock <- will be loaded
/moodle/blocks/myblock/mydir <- won't be loaded
Any ideas 'bout this?
Thanks in Advance,
What should Moodle load in that directory?
The database scripts you asked about should be inside
blocks/myblock/db/ They will be executed upon installation of the block. Code in other subdirectories will only be executed if your block class refers to it.
You have read the blocks howto that resides inside your blocks directory? The stuff about database is not in there (because most information about a block can be serialized and stored inside the
block_instance table), but the rest of the Howto is really well written.
So, when i have an other folder (not db one...) in my block folder... moodle doesn't load my block...
P.S. - the folder inside my block folder doesn't have anything to be loaded, it only haves some files that are used by the block itself..,
and somewhere in /blocks/myblock/block_myblock.php i have:
<a href="myview/index.php">bla bla</a>
Now, I get it... It might have been easier if you had attached a small part of the code.
You can use something like the following...
'<a href="'.$CFG->wwwroot.'/blocks/myblock/myview/index.php'.'">'. get_string('bla_bla', 'myblock').'</a>';
Thanks for all your help and sorry for my lack of explaining...
This have been my first days in moodle development, everything seemed too fast, but this post proves that this is a real community!