Basic Block example
Is the "Hello World" tutorial that ships with every single language "horrible" as well?
I have updated the tutorials that link to it, however, and linked them to this file instead:
This I believe should be non-corrupted.
It is a great start but is pretty much a hello world only,
it would be nice to maybe have a slightly more advanced block like a "hello Universe" with a bit more function like validation and some functions like the on_view|before_page_render|edit|save
Install this addon and create a block with just one text field, for example, then go examine the generated block's code. A lot of people have found it useful for learning purposes like this.
PS - I love your phrase "necro this thread" -- never heard that before, will be using it a lot from now on though!
If I edit something in the controller.php or view.php files, the changes are not immediately reflected if I simply reload the page, I have to clear the cache first. But if I let the page sit there for awhile (5min or maybe even less) and then reload, the changes are reflected without having to clear the cache.
I'm assuming some cookie timer somewhere has timed out (?). Is there a way to adjust that timer to something much closer to zero? I'd rather have a reload actually reload the page from the server, not from the cache (at least while the site is in development.)
Alternatively, you could adjust the cache settings on that one block you're working with by modifying these lines at the top of the controller.php file:
protected $btCacheBlockRecord = true; protected $btCacheBlockOutput = true; protected $btCacheBlockOutputOnPost = true; protected $btCacheBlockOutputForRegisteredUsers = true; protected $btCacheBlockOutputLifetime = 300;
(change the 300 to something else, or turn it off entirely by setting all the "true"'s to "false" -- or delete all of those lines entirely and it won't cache I believe).