Skip to content
This repository has been archived by the owner on Jul 26, 2019. It is now read-only.

Commit

Permalink
Adds news url patterns for basic page and blog
Browse files Browse the repository at this point in the history
 reference-> #125
  • Loading branch information
tkuldeep committed Feb 12, 2014
1 parent 57ba8fc commit cb23af4
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 0 deletions.
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 sites/all/modules/custom/features/f_url_alias/f_url_alias.info
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
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';
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;
}

1 comment on commit cb23af4

@sumeetpareek
Copy link
Collaborator

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?

Please sign in to comment.