1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <?php
- if ($teaser) {
- print render($content);
- } else {
- $node_type = $node->type; ?>
- <script type="text/javascript">
-
-
-
- jQuery(document).ready(function ($) {
-
- $('.tripal-data-pane').hide().filter(':first-child').show()
-
-
- $('.tripal_toc_list_item_link').click(function () {
- var id = $(this).attr('id') + '-tripal-data-pane'
- $('.tripal-data-pane').hide().filter('#' + id).fadeIn('fast')
- $('.tripal_toc_list_item_link').removeClass('active')
- $(this).addClass('active')
- return false
- })
-
-
-
-
- var pane
- pane = window.location.href.match(/[\?|\&]pane=(.+?)[\&|\
- if (pane == null) {
- pane = window.location.href.match(/[\?|\&]pane=(.+)/)
- }
-
- if (pane == null) {
- pane = window.location.href.match(/[\?|\&]block=(.+?)[\&|\
- if (pane == null) {
- pane = window.location.href.match(/[\?|\&]block=(.+)/)
- }
- }
- if (pane != null) {
- $('.tripal-data-pane').hide().filter('#' + pane[1] + '-tripal-data-pane').show()
- $('.tripal_toc_list_item_link[href="'+pane[0]+'"]').addClass('active')
- }
- if(pane === null) {
- $('.tripal_toc_list_item_link').first().addClass('active')
- }
-
-
-
- })
- </script>
- <div class="row">
- <div class="col-sm-2">
- <?php
- // print the table of contents. It's found in the content array
- if (array_key_exists('tripal_toc', $content)) {
- print $content['tripal_toc']['#markup'];
-
-
-
-
- unset($content['tripal_toc']);
- unset($content['links']);
- }
- ?>
- </div>
- <div class="col-sm-10">
- <?php
- // print the rendered content
- foreach ($content as $key => $value) {
- if (isset($content[$key]['#markup'])) {
- $content[$key]['#markup'] = rtrim(trim($content[$key]['#markup']), '</div>');
- }
- }
- print render($content);
- ?>
- </div>
- </div>
- <?php
- }
|