navigation MDL-21350 Implemented trim options for the navigation block, can now set trim mode (right/left/center) and trim length

This commit is contained in:
Sam Hemelryk
2010-04-21 07:05:39 +00:00
parent f77f615de6
commit a9535f7945
6 changed files with 147 additions and 24 deletions
-9
View File
@@ -190,15 +190,6 @@ class navigation_node implements renderable {
}
// Default the title to the text
$this->title = $this->text;
$textlib = textlib_get_instance();
if (strlen($this->text)>50) {
// Truncate the text to 50 characters
$this->text = $textlib->substr($this->text, 0, 50).'...';
}
if (is_string($this->shorttext) && strlen($this->shorttext)>25) {
// Truncate the shorttext
$this->shorttext = $textlib->substr($this->shorttext, 0, 25).'...';
}
// Instantiate a new navigation node collection for this nodes children
$this->children = new navigation_node_collection();
}