Skip to content

Instantly share code, notes, and snippets.

@curtisblackwell curtisblackwell/README.md
Last active Dec 31, 2015

Embed
What would you like to do?
Support for Markdown in Statamic's dashboard.

Markdown in Statamic Dashboard

Replace admin/themes/ascent/templates/dashboard.php with this dashboard.php.

Tables

If you're using tables, you'll also need to include the override add-on with the following directory structure:

_add-ons
  override
    js
      tuchus.js
    hooks.override.php
<div class="container">
<div class="row">
<div class="span8">
<div class="panel">
<?php $app = \Slim\Slim::getInstance();
if (isset($app->config['dashboard_main_content'])):
echo Markdown($app->config['dashboard_main_content']);
endif ?>
</div>
</div>
<div class="span4">
<div class="panel topo">
<?php if (isset($app->config['dashboard_sidebar_content'])):
echo Markdown($app->config['dashboard_sidebar_content']);
endif ?>
</div>
</div>
</div>
</div>
</div>
<?php
class Hooks_override extends Hooks {
function control_panel__add_to_foot() {
return $this->js->link('tuchus.js');
}
}
$('.panel table').addClass('table-list');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.