Apache-PageKit

 view release on metacpan or  search on metacpan

docsrc/features.xml  view on Meta::CPAN

   </para>
   <para>
    All of the input request parameters are available to the XSLT file by
    using the <literal>xsl:param</literal> tag in the top level of the file.
   </para>
   <para>
    The output of XSL Transformation should be a PageKit Template or a
    HTML/XML/WML file (which is a special case of a PageKit Template file, namely one without any PageKit tags).  Note that the Data from the Model gets
    filled in after the XSL transformation.  This is done for performance
    reasons - the XSL tranformation can be cached, even if the data from
    the model is updated.
   </para>
  </sect2>
  <sect2>
   <title>HTML::Template::XPath</title>
   <para>
    Using HTML::Template::XPath is easy with PageKit, it is build into the
    PageKit Template by using
    &lt;CONTENT_VAR&gt; and &lt;CONTENT_LOOP&gt; tags, which contain
    XPath queries to the Content XML data.
   </para>

lib/Apache/PageKit/FAQ.pod  view on Meta::CPAN


=for html
<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#4020ff" ALINK="#ff0000" VLINK="#ff2530">
<CENTER>
<FONT SIZE="+2">
Apache::PageKit Frequently Asked Questions $Id: FAQ.pod,v 1.7 2004/01/06 16:31:47 borisz Exp $
</FONT>
<BR>
<FONT SIZE="-1">
<I>Last updated: Sep 26th, 2003</I>
</FONT>
</CENTER>
<P>

=head1 NAME

Apache::PageKit::FAQ -- The Frequently Asked Questions for Apache::PageKit

=head1 SYNOPSIS

lib/Apache/PageKit/View.pm  view on Meta::CPAN

  my $record = $view->_fetch_from_file_cache($page_id, $pkit_view, $lang);
  unless($record){
    # template not cached, load now
    $view->_load_page($page_id, $pkit_view);
    $record = $view->_fetch_from_file_cache($page_id, $pkit_view, $lang);
    die "Error loading record for page_id $page_id and view $pkit_view"
      unless $record;
  }

  if($view->{reload} ne 'no'){
    # check for updated files on disk
    unless($view->_is_record_uptodate($record, $pkit_view, $page_id)){
      # one of the included files changed on disk, reload
      $view->_load_page($page_id, $pkit_view);
      $record = $view->_fetch_from_file_cache($page_id, $pkit_view, $lang);
    }
  }

  $view->{record} = $record;
  $view->{already_loaded}->{$page_id} = 1;
}

migration/migrate_pagekit_0.99_to_1.00.pl  view on Meta::CPAN


  # <PKIT_LOOP NAME="MESSAGE">
  $cf += ($template =~ s!<PKIT_LOOP +NAME *= *("|')?MESSAGE("|')? *>(.*?)</PKIT_LOOP>!<PKIT_MESSAGES>$3</PKIT_MESSAGES>!sig);
  $cf += ($template =~ s!<PKIT_IF +NAME *= *("|')?IS_ERROR("|')? *>(.*?)</PKIT_IF>!<PKIT_IS_ERROR>$3</PKIT_IS_ERROR>!sig);
  $cf += ($template =~ s!<PKIT_VAR +NAME *= *("|')?MESSAGE("|')? *>!<PKIT_MESSAGE>!sig);

  # <PKIT_VAR NAME="HOSTNAME">
  $cf += ($template =~ s!<PKIT_VAR +NAME *= *("|')?HOSTNAME("|')? *>!<PKIT_HOSTNAME>!sig);

  if($cf){
    print "updated $filename, made $cf substitution(s)\n";
#    rename "$filename", "$filename.bak";
    open TEMPLATE, ">$filename";
    print TEMPLATE $template;
    close TEMPLATE;
  }
}



( run in 0.278 second using v1.01-cache-2.11-cpan-05444aca049 )