Skip to content

Instantly share code, notes, and snippets.

@curtisblackwell
Last active December 31, 2015 16:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save curtisblackwell/8017682 to your computer and use it in GitHub Desktop.
Save curtisblackwell/8017682 to your computer and use it in GitHub Desktop.
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