|
1 | 1 | module.exports = function IndexModule(pb) {
|
| 2 | + |
2 | 3 | /**
|
3 | 4 | * Index - The home page controller of the portfolio theme.
|
4 | 5 | *
|
5 | 6 | * @author Blake Callens <[email protected]>
|
6 | 7 | * @copyright 2014 PencilBlue, LLC. All Rights Reserved
|
7 | 8 | */
|
8 |
| - |
9 | 9 | function Index() {}
|
10 | 10 |
|
11 |
| - //dependencies |
12 |
| - var PluginService = pb.PluginService; |
13 |
| - var util = pb.util; |
14 |
| - var TopMenu = pb.TopMenuService; |
15 |
| - var Comments = pb.CommentService; |
16 |
| - var ArticleService = pb.ArticleService; |
17 |
| - var externalProfiles = PluginService.getService('external_profiles', 'devblog-pencilblue'); |
18 |
| - var pluginService = new PluginService(); |
| 11 | + //dependencies |
| 12 | + var util = pb.util; |
| 13 | + var config = pb.config; |
| 14 | + var PluginService = pb.PluginService; |
| 15 | + var TopMenu = pb.TopMenuService; |
| 16 | + var Comments = pb.CommentService; |
| 17 | + var ArticleService = pb.ArticleService; |
| 18 | + var externalProfiles = PluginService.getService('external_profiles', 'devblog-pencilblue'); |
| 19 | + var pluginService = new PluginService(); |
19 | 20 |
|
20 |
| - //inheritance |
21 |
| - util.inherits(Index, pb.BaseController); |
| 21 | + //inheritance |
| 22 | + util.inherits(Index, pb.BaseController); |
22 | 23 |
|
23 |
| - /** |
24 |
| - * This is the function that will be called by the system's RequestHandler. It |
25 |
| - * will map the incoming route to the ones below and then instantiate this |
26 |
| - * prototype. The request handler will then proceed to call this function. |
27 |
| - * Its callback should contain everything needed in order to provide a response. |
28 |
| - * |
29 |
| - * @param cb The callback. It does not require a an error parameter. All |
30 |
| - * errors should be handled by the controller and format the appropriate |
31 |
| - * response. The system will attempt to catch any catastrophic errors but |
32 |
| - * makes no guarantees. |
33 |
| - */ |
34 |
| - Index.prototype.render = function(cb) { |
| 24 | + /** |
| 25 | + * This is the function that will be called by the system's RequestHandler. It |
| 26 | + * will map the incoming route to the ones below and then instantiate this |
| 27 | + * prototype. The request handler will then proceed to call this function. |
| 28 | + * Its callback should contain everything needed in order to provide a response. |
| 29 | + * |
| 30 | + * @param cb The callback. It does not require a an error parameter. All |
| 31 | + * errors should be handled by the controller and format the appropriate |
| 32 | + * response. The system will attempt to catch any catastrophic errors but |
| 33 | + * makes no guarantees. |
| 34 | + */ |
| 35 | + Index.prototype.render = function(cb) { |
35 | 36 | var self = this;
|
36 | 37 |
|
37 | 38 | var content = {
|
@@ -70,7 +71,7 @@ module.exports = function IndexModule(pb) {
|
70 | 71 | self.ts.registerLocal('meta_keywords', homePageKeywords);
|
71 | 72 | self.ts.registerLocal('meta_desc', homePageDescription);
|
72 | 73 | self.ts.registerLocal('meta_title', pb.config.siteName);
|
73 |
| - self.ts.registerLocal('meta_lang', localizationLanguage); |
| 74 | + self.ts.registerLocal('meta_lang', config.localization.defaultLocale); |
74 | 75 | self.ts.registerLocal('current_url', self.req.url);
|
75 | 76 | self.ts.registerLocal('navigation', new pb.TemplateValue(navigation, false));
|
76 | 77 | self.ts.registerLocal('account_buttons', new pb.TemplateValue(accountButtons, false));
|
|
0 commit comments