-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
1,367 additions
and
689 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 0 additions & 73 deletions
73
cartridges/int_styla/cartridge/pipelines/StylaMagazine.xml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 0 additions & 51 deletions
51
cartridges/int_styla/cartridge/scripts/pipelets/GetAliasPipeline.js
This file was deleted.
Oops, something went wrong.
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
cartridges/int_styla_refArch/cartridge/controllers/RedirectURL.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
'use strict'; | ||
|
||
var server = require('server'); | ||
|
||
server.extend(module.superModule); | ||
|
||
server.append('Start', function (req, res, next) { | ||
var URLRedirectMgr = require('dw/web/URLRedirectMgr'); | ||
|
||
var redirect = URLRedirectMgr.redirect; | ||
var location = redirect ? redirect.location : null; | ||
|
||
if (!location) { | ||
var StylaMain, | ||
path = URLRedirectMgr.redirectOrigin, | ||
handledByStyla = false; | ||
if (dw.system.Site.current.getCustomPreferenceValue('stylaEnabled') == true) { | ||
StylaMain = require('/int_styla_refArch/cartridge/scripts/stylaMain'); | ||
handledByStyla = StylaMain.Alias(path); | ||
} | ||
|
||
if (handledByStyla) { | ||
return handledByStyla; | ||
} | ||
} | ||
|
||
next(); | ||
}); | ||
|
||
module.exports = server.exports(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.