Hi All
I have spent the last 2 days on getting this right - and have also tried to search a lot on the forums, but cant seem to get it right. My reqiurement:
1. All urls of type http://www.example.com/voices/abc - they are "outbound" rewritten as http://voices.example.com/abc OR http://voices.example.com/voices/abc
2. when I am in "Voices" subdomain - all URLs point to the voices subdomain only - except for some menu items which i can exclude.
Here is my code till now:

/**
 * Implementation of hook_purl_provider().
 */
function mymodule_purl_purl_provider() {
  $items = array();
  $items['mymodule_domain'] = array(
    'name' => t('Mymodule Domain PURL test'),
    'description' => t('Mymodule Provider for use with PURL tests.'),
    'callback' => 'mymodule_purl_activate',
    'callback arguments' => array(),
    'example' => 'foo',
  );
  return $items;
}

/**
 * PURL callback for test providers.
 */
function mymodule_purl_activate($value) {
   // I have no idea what needs to come here - how do I write the code to rewrite the url
}

/**
 * Implementation of hook_purl_modifiers().
 */
function mymodule_purl_purl_modifiers() {
	// for subdomain changes
	$tmp['mymodule_domain'] = array(
	      array('value' => 'voices', 'id' => 'voices'),
	      array('value' => 'campaigns', 'id' => 'campaigns'),
	);	
	return $tmp;
}

Can somebody please help me with how to proceed with the callback function.
thanks

Comments

gargsuchi’s picture

Bump - somebody, please help me. I looked at spaces_og implementation as well - and it uses views to alter the links, do i need to do that as well?

bblake’s picture

Status: Active » Postponed (maintainer needs more info)

Can you please provide a little more information on what the problem is and what you're trying to accomplish?