This repository has been archived by the owner on Jul 26, 2019. It is now read-only.
-
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.
Adds news url patterns for basic page and blog
reference-> #125
- Loading branch information
tkuldeep
committed
Feb 12, 2014
1 parent
57ba8fc
commit cb23af4
Showing
4 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
sites/all/modules/custom/features/f_url_alias/f_url_alias.features.inc
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,15 @@ | ||
<?php | ||
/** | ||
* @file | ||
* f_url_alias.features.inc | ||
*/ | ||
|
||
/** | ||
* Implements hook_ctools_plugin_api(). | ||
*/ | ||
function f_url_alias_ctools_plugin_api() { | ||
list($module, $api) = func_get_args(); | ||
if ($module == "strongarm" && $api == "strongarm") { | ||
return array("version" => "1"); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
sites/all/modules/custom/features/f_url_alias/f_url_alias.info
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,15 @@ | ||
name = Url Alias | ||
core = 7.x | ||
package = AAP Features | ||
version = 7.x-1.0 | ||
project = f_url_alias | ||
dependencies[] = ctools | ||
dependencies[] = pathauto | ||
dependencies[] = strongarm | ||
features[ctools][] = strongarm:strongarm:1 | ||
features[features_api][] = api:1 | ||
features[variable][] = pathauto_node_basic_page_pattern | ||
features[variable][] = pathauto_node_blog_pattern | ||
features[variable][] = pathauto_node_event_pattern | ||
features[variable][] = pathauto_node_news_pattern | ||
features[variable][] = pathauto_node_pattern |
7 changes: 7 additions & 0 deletions
7
sites/all/modules/custom/features/f_url_alias/f_url_alias.module
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,7 @@ | ||
<?php | ||
/** | ||
* @file | ||
* Code for the Url Alias feature. | ||
*/ | ||
|
||
include_once 'f_url_alias.features.inc'; |
49 changes: 49 additions & 0 deletions
49
sites/all/modules/custom/features/f_url_alias/f_url_alias.strongarm.inc
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,49 @@ | ||
<?php | ||
/** | ||
* @file | ||
* f_url_alias.strongarm.inc | ||
*/ | ||
|
||
/** | ||
* Implements hook_strongarm(). | ||
*/ | ||
function f_url_alias_strongarm() { | ||
$export = array(); | ||
|
||
$strongarm = new stdClass(); | ||
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ | ||
$strongarm->api_version = 1; | ||
$strongarm->name = 'pathauto_node_basic_page_pattern'; | ||
$strongarm->value = '[node:title]'; | ||
$export['pathauto_node_basic_page_pattern'] = $strongarm; | ||
|
||
$strongarm = new stdClass(); | ||
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ | ||
$strongarm->api_version = 1; | ||
$strongarm->name = 'pathauto_node_blog_pattern'; | ||
$strongarm->value = '[node:title]'; | ||
$export['pathauto_node_blog_pattern'] = $strongarm; | ||
|
||
$strongarm = new stdClass(); | ||
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ | ||
$strongarm->api_version = 1; | ||
$strongarm->name = 'pathauto_node_event_pattern'; | ||
$strongarm->value = 'event/[node:title]'; | ||
$export['pathauto_node_event_pattern'] = $strongarm; | ||
|
||
$strongarm = new stdClass(); | ||
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ | ||
$strongarm->api_version = 1; | ||
$strongarm->name = 'pathauto_node_news_pattern'; | ||
$strongarm->value = 'tnews/[node:title]'; | ||
$export['pathauto_node_news_pattern'] = $strongarm; | ||
|
||
$strongarm = new stdClass(); | ||
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ | ||
$strongarm->api_version = 1; | ||
$strongarm->name = 'pathauto_node_pattern'; | ||
$strongarm->value = '[node:title]'; | ||
$export['pathauto_node_pattern'] = $strongarm; | ||
|
||
return $export; | ||
} |
cb23af4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tkuldeep It does not make sense to have the a feature for just URL aliases. They should belong to the feature that holds the respective content type, if we already have features for such content types. See #80 for how we did it here.
Can you think of other appropriate feature to add this to? And let go of this?