Articulate

 view release on metacpan or  search on metacpan

examples/plain-speaking/views/article.tt  view on Meta::CPAN

[%- FOREACH section in article.components.sections -%]
<section>
  [% section.content %]
</section>
[%- END -%]
<footer class="small text-muted">
  <div class="article-meta-created">
    Written at about <time itemprop="dateModified">[% date.format(article.schema.core.dateCreated) | html %]</time>
  </div>
  [%- IF article.schema.core.dateCreated != article.schema.core.dateUpdated  -%]
  <div class="article-meta-updated">
    Revised at approximately <time itemprop="dateModified">[% date.format(article.schema.core.dateUpdated, '%a %d %b %y', 'en_GB') | html %]</time>
  </div>
  [%- END -%]
</footer>
</article>

examples/plain-speaking/views/article_result.tt  view on Meta::CPAN

    class="article-title h3"
    itemprop="name"
  >
      [% article.schema.core.title | html %]
  </p>
<div class="small text-muted">
  <div class="article-meta-created">
    Written at about <time itemprop="dateModified">[% date.format(article.schema.core.dateCreated) | html %]</time>
  </div>
  [%- IF article.schema.core.dateCreated != article.schema.core.dateUpdated  -%]
  <div class="article-meta-updated">
    Revised at approximately <time itemprop="dateModified">[% date.format(article.schema.core.dateUpdated, '%a %d %b %y', 'en_GB') | html %]</time>
  </div>
  [%- END -%]
</div>
</a>

lib/Articulate/Enrichment.pm  view on Meta::CPAN


=head1 NAME

Articulate::Enrichment - tidy up your content before it goes into the database

=head1 DESCRIPTION

  use Articulate::Enrichment;
  $request = enrichment->enrich($item, $request);

This will pass the item and the request to a series of enrichment objects, each of which has the opportunity to alter the item according to their own rules, for instance, to add an 'updated on' date to the meta or to fix minor errors in the content.

Services should typically invoke enrichment when they create or update content, after validation but before storage.

Note: the item passed in is not cloned so this will typically mutate the item.

Enrichments should not mutate the request, however there is no technical barrier to them doing so.

=head1 ATTRIBUTES

=head3 enrichments

t/views/article.tt  view on Meta::CPAN

</section>
[%- END -%]
<footer>
  <div class="article-id">
    This is  [% article.article_id | html %]
  </div>
  <div class="article-meta-created">
    Created <time itemprop="dateModified">[% article.schema.core.dateCreated | html %]</time>
  </div>
  [%- IF article.schema.core.dateCreated != article.schema.core.dateUpdated  -%]
  <div class="article-meta-updated">
    Updated <time itemprop="dateModified">[% article.schema.core.dateUpdated | html %]</time>
  </div>
  [%- END -%]
</footer>
</article>



( run in 0.275 second using v1.01-cache-2.11-cpan-2b0bae70ee8 )