Toggle navigation
Toggle navigation
This project
Loading...
English
Português
Español
Sign in
Argentina
/
poncho
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Catalog
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
darduino
2017-03-16 15:22:35 -0300
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
4308a23752e15fc863e06c6d3dde06effd97b0b4
4308a237
2 parents
d940526e
2b1b74ea
merge
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
0 deletions
templates/book-navigation.tpl.php
templates/book-navigation.tpl.php
0 → 100644
View file @
4308a23
<?php
/**
* @file
* Default theme implementation to navigate books.
*
* Presented under nodes that are a part of book outlines.
*
* Available variables:
* - $tree: The immediate children of the current node rendered as an unordered
* list.
* - $current_depth: Depth of the current node within the book outline. Provided
* for context.
* - $prev_url: URL to the previous node.
* - $prev_title: Title of the previous node.
* - $parent_url: URL to the parent node.
* - $parent_title: Title of the parent node. Not printed by default. Provided
* as an option.
* - $next_url: URL to the next node.
* - $next_title: Title of the next node.
* - $has_links: Flags TRUE whenever the previous, parent or next data has a
* value.
* - $book_id: The book ID of the current outline being viewed. Same as the node
* ID containing the entire outline. Provided for context.
* - $book_url: The book/node URL of the current outline being viewed. Provided
* as an option. Not used by default.
* - $book_title: The book/node title of the current outline being viewed.
* Provided as an option. Not used by default.
*
* @see template_preprocess_book_navigation()
*
* @ingroup themeable
*/
?>
<div
id=
"book-navigation-
<?php
print
$book_id
;
?>
"
class=
"book-navigation"
>
<div
class=
"nav nav-pills nav-stacked"
>
<?php
$book_links
=
book_get_flat_menu
(
$variables
[
'book_link'
]);
?>
<ul
class=
"nav nav-pills nav-stacked"
>
<?php
foreach
(
$book_links
as
$key
=>
$value
)
{
?>
<?php
$url
=
drupal_get_path_alias
(
$value
[
'link_path'
]);
?>
<?php
$active
=
drupal_get_path_alias
(
current_path
())
==
$url
?
"active"
:
""
;
?>
<li
class=
"btn-title
<?php
print
$active
?>
"
>
<?php
print
l
(
$value
[
'title'
],
$value
[
'link_path'
]);
?>
</li>
<?php
}
?>
</ul>
</div>
</div>
...
...
Please
register
or
login
to post a comment