Skip to content

Commit

Permalink
INREL-1382: Fix path to amp-analytics-infonline.html
Browse files Browse the repository at this point in the history
  • Loading branch information
freudenberg committed Jan 20, 2017
1 parent 9372509 commit 0376606
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
iom.c(iam_data, 2);
</script>
</body>
</html>
</html>
6 changes: 4 additions & 2 deletions src/Plugin/Field/FieldFormatter/IvwAmpFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,10 @@ public function viewElements(
$langcode = NULL
) {
$elements = [];
$ampDomainPrefix = $this->configFactory->get('ivw_integration_amp.settings')
$domain = $this->configFactory
->get('ivw_integration_amp.settings')
->get('amp_analytics_infonline_domain');
$module_path = drupal_get_path('module', 'ivw_integration_amp');

// core token devs don't like the concept of callable
// getting the method of the static class as closure keeps the callback overridable by subclasses
Expand All @@ -168,7 +170,7 @@ public function viewElements(
'callback' => $callback,
]
);
$url = "https://$ampDomainPrefix/sites/all/mdoules/contrib/ivw_integration_amp/pages/amp-analytics-infoline.html";
$url = "https://$domain/$module_path/pages/amp-analytics-infonline.html";

$elements[$delta] = [
'#type' => 'ivw_amp',
Expand Down

0 comments on commit 0376606

Please sign in to comment.