NAME

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


NOTICE: This module is DEPRECATED

Use $publisher->url_for(object => $object) instead, see Krang::Publisher>.

For Backward-comptibility, pkg('URL')->real_url() is now just a wrapper method that dispatches to it's successor: $publisher->url_for().


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