On 2014-02-11 9:32 AM, Forest S wrote:
Thanks for the follow up, Bill.
You wrote,
Something finally clicked, when I realized that I
could
contain any custom HTML in myskin.skin.php
and any styling in screen.css.
I see how you can add CSS to screen.css by
overriding the following method
(taken from tutorial #2):
function setupSkinUserCss( OutputPage $out ) {
parent::setupSkinUserCss( $out );
$out->addModuleStyles( "skins.myskin" );
}
But how do you add HTML? This is the primary challenge for us. Adding the
ability to do this would, I think, substantially extend the power of
Daniel's excellent tutorial. Would you be willing to share some of the code
you use for adding custom HTML in myskin.skin.php?
Best,
Forest
The HTML is controlled by the template, you can make a subclass of the
template class that the skin you're based on uses and then define var
$template in your skin.
But the caveat in our current system is that if you want to make a minor
change to the body you'll have to copy the entire execute method to
modify it.
Although if you just want to tweak one of the data params to the
template you can do that with:
function execute() {
$this->data['...'] = ...;
// ...
return parent::execute();
}
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [
http://danielfriesen.name/]