Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uw_ct_service
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WCMS
uw_ct_service
Commits
25446292
Commit
25446292
authored
3 years ago
by
Eric Bremner
Browse files
Options
Downloads
Patches
Plain Diff
ISTWCMS-5129: trying to fix tabs for services
parent
1c3cb711
No related branches found
No related tags found
4 merge requests
!60
ISTWCMS-6095 Update maxlength settings for title, text fields and link fields...
,
!25
ISTWCMS-5779 Click update button under...
,
!8
Feature/istwcms 5127 ebremner services blocks gui
,
!7
Feature/istwcms 5129 ebremner theme services views
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
uw_ct_service.module
+7
-38
7 additions, 38 deletions
uw_ct_service.module
with
7 additions
and
38 deletions
uw_ct_service.module
+
7
−
38
View file @
25446292
...
@@ -135,7 +135,7 @@ function uw_ct_service_preprocess_views_view(&$variables)
...
@@ -135,7 +135,7 @@ function uw_ct_service_preprocess_views_view(&$variables)
$services_ids
=
[
$services_ids
=
[
'services_page'
,
'services_page'
,
'popular_services_page'
,
'popular_services_page'
,
'service
_for
_audience_page'
,
'service
s_by
_audience_page'
,
'services_in_category_page'
,
'services_in_category_page'
,
'all_services_page'
,
'all_services_page'
,
];
];
...
@@ -164,49 +164,18 @@ function uw_ct_service_preprocess_views_view(&$variables)
...
@@ -164,49 +164,18 @@ function uw_ct_service_preprocess_views_view(&$variables)
];
];
$content_list
[]
=
[
$content_list
[]
=
[
'url'
=>
'/services/audience
/'
.
end
(
$current_path_parts
)
,
'url'
=>
'/services/audience
'
,
'text'
=>
'Audience'
,
'text'
=>
'Audience'
,
'active'
=>
strpos
(
$current_path
,
'/services/audience/'
)
!==
false
?
1
:
0
,
'active'
=>
strpos
(
$current_path
,
'/services/audience/'
)
!==
false
?
1
:
0
,
];
];
$test
=
''
;
$content_list
[]
=
[
'url'
=>
'/services/popular'
,
'text'
=>
'Audience'
,
'active'
=>
strpos
(
$current_path
,
'/services/audience/'
)
!==
false
?
1
:
0
,
];
}
}
$variables
[
'content_list'
]
=
$content_list
;
$variables
[
'content_list'
]
=
$content_list
;
}
}
// If we are on a service view that needs the tab
// links, then process the tabs links.
if
(
$id
==
'uw_view_service_show_nodes'
||
$id
==
'uw_view_service_show_terms'
)
{
// // Taxonomy term id from views argument.
// $term_id = reset($variables['view']->args);
//
// // Building path from route for taxonomy term.
// // If there is an alias it will be used.
// $path = Url::fromRoute('entity.taxonomy_term.canonical', ['taxonomy_term' => $term_id])->toString();
//
// // Get the current path and put into array based on
// // the slashes.
// $current_path = explode('/', \Drupal::service('path.current')->getPath());
//
// // Get the taxonomy term.
// $term = \Drupal::entityTypeManager()->getStorage('taxonomy_term')->load($term_id);
//
// // Get the tabs to be displayed.
// $tabs = $term->field_uw_catalog_tabs_display->getValue();
//
// // Only show the A-Z tab if there are other tabs.
// $content_list = [];
// if ($tabs) {
// // Setup the variable for the content list to be passed
// // to pattern-lab.
// $content_list[] = [
// 'url' => $path,
// 'text' => 'A-Z',
// 'active' => end($current_path) == $term_id ? 1 : 0,
// ];
// }
//
// $variables['content_list'] = $content_list;
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment