Skip to content

Commit

Permalink
Merge pull request #1 from chrometoasters/silverstripe4-update
Browse files Browse the repository at this point in the history
Update to work with SilverStripe 4
  • Loading branch information
zarocknz authored Dec 20, 2018
2 parents 568070d + 706c1bb commit e49a4dc
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 17 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.

This project adheres to [Semantic Versioning](http://semver.org/).

## [2.0.0]

Update to work with SilverStripe 4.

## [1.0.0]

Initial module release.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2017, Chrometoaster New Media Ltd.
Copyright (c) 2018, Chrometoaster Ltd.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Comes with Google snippets that need to be included in your theme's templates.

## Requirements

* SilverStripe 3.1 and above
* SilverStripe 4.0 and above

## Installation

Expand Down Expand Up @@ -33,17 +33,17 @@ Place two template includes into your theme's main template, e.g. Page.ss.
<meta charset="utf-8">
<title itemprop="name">$Title</title>

<% include GA_GTM_head %>
<% include Chrometoaster\GA_GTM\GA_GTM_head %>
```

#### Body

`<% include GA_GTM_body %>` directly after the opening `<body>` tag:
`<% include Chrometoaster\GA_GTM\GA_GTM_body %>` directly after the opening `<body>` tag:

```html
</head>
<body>
<% include GA_GTM_body %>
<% include Chrometoaster\GA_GTM\GA_GTM_body %>
```


Expand Down
7 changes: 2 additions & 5 deletions _config/config.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
---
Name: ga-gtm-singlefield
After:
- 'framework/*'
- 'cms/*'
---
SiteConfig:
SilverStripe\SiteConfig\SiteConfig:
extensions:
- GASiteConfigExtension
- Chrometoaster\GA_GTM\Extensions\GASiteConfigExtension
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
}
],
"require": {
"php": ">=5.4",
"silverstripe/framework": "~3.1",
"silverstripe/cms": "~3.1"
"php": "^7.1",
"silverstripe/framework": "~4.0",
"silverstripe/cms": "~4.0"
},
"minimum-stability": "stable",
"license": "BSD-3-Clause"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?php

namespace Chrometoaster\GA_GTM\Extensions;

use Chrometoaster\GA_GTM\Formfields\GACodeField;
use SilverStripe\Forms\FieldList;
use SilverStripe\ORM\DataExtension;

/**
* Class GASiteConfig
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

namespace Chrometoaster\GA_GTM\Formfields;

use SilverStripe\Forms\TextField;

/**
* Class GACodeField
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<% with $SiteConfig %>
<% if $GoogleCode %>
<% if $AnalyticType == 'GTM' %>
<% include GTM_body %>
<% include Chrometoaster\GA_GTM\Includes\GTM_body %>
<% end_if %>
<% if $AnalyticType == 'UA' %>
<% include GA_body %>
<% include Chrometoaster\GA_GTM\Includes\GA_body %>
<% end_if %>
<% end_if %>
<% end_with %>
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<% with $SiteConfig %>
<% if $GoogleCode %>
<% if $AnalyticType == 'GTM' %>
<% include GTM_head %>
<% include Chrometoaster\GA_GTM\Includes\GTM_head %>
<% end_if %>
<% if $AnalyticType == 'UA' %>
<% include GA_head %>
<% include Chrometoaster\GA_GTM\Includes\GA_head %>
<% end_if %>
<% end_if %>
<% end_with %>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit e49a4dc

Please sign in to comment.