Commit d165982b authored by Milosz Galazka's avatar Milosz Galazka 😼

Added option to create local links only

parent 5de6ce16
......@@ -73,7 +73,7 @@ class syntax_plugin_monthcal extends DokuWiki_Syntax_Plugin {
$data['borders'] = 0;
$data['mark_today'] = 1;
$data['align'] = 0;
$data['create_prev_next_links'] = 1;
$data['create_prev_next_links'] = 0;
$provided_data = substr($match, 11, -2);
$arguments = explode (',', $provided_data);
......@@ -94,6 +94,9 @@ class syntax_plugin_monthcal extends DokuWiki_Syntax_Plugin {
case 'no':
$data['create_links'] = 0;
break;
case 'local':
$data['create_links'] = 2;
break;
default:
$data['create_links'] = 1;
break;
......@@ -337,6 +340,8 @@ class syntax_plugin_monthcal extends DokuWiki_Syntax_Plugin {
} else {
$html_day = html_wikilink($id, $date->format('d'));
}
} else if ($data['create_links'] == '2' ) {
$html_day = '<a href="#section' . $date->format('d') . '">' . $date->format('d') . '</a>';
} else {
$html_day = $date->format('d');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment