Permalink
Browse files

Modified alias to make it digitalstrategy/{type}.

Modified menu item to allow for file extensions - digitalstrategy.{type}.

All per recommendations for digital strategy project - https://github.com/GSA/digital-strategy.
  • Loading branch information...
1 parent 5688517 commit 12f1eb1d53432b123e972044bd04fc575efdb8a3 @andrew-wolfe andrew-wolfe committed Jul 24, 2012
Showing with 5 additions and 5 deletions.
  1. +3 −3 digital_strategy.install
  2. +2 −2 digital_strategy.module
View
6 digital_strategy.install
@@ -22,7 +22,7 @@ function digital_strategy_enable() {
// On module disable delete nodes and digital strategy type variables
function digital_strategy_disable() {
foreach (variable_get('digital_strategy_types', array("xml", "json", "jsonp")) as $type) {
- $alias = "digital-strategy/progress-" . $type;
+ $alias = "digitalstrategy/" . $type;
$path = drupal_lookup_path("source", $alias);
$node = menu_get_object("node", 1, $path);
@@ -43,7 +43,7 @@ function digital_strategy_create_nodes() {
$node = new stdClass();
$node->name = "Digital Strategy Progess - " . $type;
$node->title = $node->name;
- $node->body = "";
+ $node->body = $type . "test";
$node->type = "page";
$node->created = time();
$node->changed = $node->created;
@@ -53,7 +53,7 @@ function digital_strategy_create_nodes() {
$node->format = 2;
$node->apachesolr_exclude = 1;
$node->pathauto_perform_alias = 0;
- $node->path = "digital-strategy/progress-" . $type;
+ $node->path = "digitalstrategy/" . $type;
if ($node = node_submit($node)) {
node_save($node);
View
4 digital_strategy.module
@@ -13,7 +13,7 @@ function digital_strategy_menu() {
// Loops through the digital strategy type variables to create menu callbacks for each type
foreach (variable_get('digital_strategy_types', array("xml", "json", "jsonp")) as $type) {
- $items['digital-strategy/' . $type] = array(
+ $items['digitalstrategy.' . $type] = array(
'access arguments' => array('access content'),
'page callback' => '_digital_strategy_themeless',
'page arguments' => array($type),
@@ -28,7 +28,7 @@ function digital_strategy_menu() {
function _digital_strategy_themeless($type = '') {
// get the node based on the path
// we know the path because we created it
- $alias = "digital-strategy/progress-" . $type;
+ $alias = "digita-strategy/" . $type;
$path = drupal_lookup_path("source", $alias);
$node = menu_get_object("node", 1, $path);

0 comments on commit 12f1eb1

Please sign in to comment.