NAME

Krang::ElementClass::StoryLink - story link element class


SYNOPSIS

   $class = pkg('ElementClass::StoryLink')->new(name => "leadin")


DESCRIPTION

Provides an element to link to a story. Elements of this class store a reference to the story in data().


INTERFACE

All the normal Krang::ElementClass attributes are available.

In addition to the normal interfaces, Krang::ElementClass::StoryLink also supports a ``find'' parameter. This parameter allows you to specify a ``hard filter'' which is used to limit the scope of the universe of stories from which the user may select. For example:

  # Only articles
  my $c = Krang::ElementClass::StoryLink->new(
                name => 'related_articles',
                find => { class => 'article' }
  );
  # Only articles about cats
  my $c = Krang::ElementClass::StoryLink->new(
                name => 'related_articles',
                find => { class => 'article',
                          title_like => '%cats%' }
  );

Any find parameters which are permitted by Krang::Story may be used by Krang::ElementClass::StoryLink's ``find'' parameter.