NAME

Krang::URL - adjusting Krang object URLs to their publishing context


SYNOPSIS

  use Krang::ClassLoader 'URL';
  # get the real URL for a story
  my $story_url = pkg('URL')->real_url(object => $story, publisher => $publisher);


DESCRIPTION

Krang::URL provides one method to adjust the URL of certain objects to the current publishing context (preview or publish). When publishing to preview, real_url() also checks the PreviewSSL config flag to determine the URL's scheme (http or https).

Objects passed to real_url() are expected to have two methods:

Per default, you may pass to real_url() objects of class Krang::Story, Krang::Media, Krang::Category and Krang::Site.


INTERFACE