More template file resources

Template file documentation and reference

Template file tutorials

  • Hello Worlds
    Gently introduces ProcessWire and template files. Starting from a blank slate, you'll create a site to document the planets. By Ryan Cramer
  • But what if I don't know how to code?
    This particular series of tutorials will not only introduce you to ProcessWire, but step by step, will give you those small bits of coding knowledge that will get you going and open up this amazing world of a Content Management Framework. By Joss Sanglier
  • Installing a CSS Framework
    A quick demonstration about how easy it is to use one of the many CSS frameworks available to designers. By Joss Sanglier
  • How to structure your template files
    This tutorial contrasts and compares the direct output and delayed output strategies and more. It is a very good introduction to using ProcessWire template files. By Ryan Cramer


  1. Introduction to template files
  2. Beginner version
  3. Intermediate version
  4. Multi-language version
  5. More template file resources

Comments

  • Andy

    Andy 1 year ago 21

    Hi Ryan

    Many languages have more plural forms than two. You can find it here
    http://docs.translatehouse.org/projects/localization-guide/en/latest/l10n/pluralforms.html?id=l10n/pluralforms

    But in russian languige we have 3 - one (1), two (2,3,4), many (5,6,7,8,9,0)

    For example php code for russian count

    class datext{
    public static function proceedTextual( $numeric, $one, $two, $many )
    {
    $numeric = (int) abs($numeric);
    if ( (numeric % 100 == 1 || ($numeric % 100 > 20) && ( $numeric % 10 == 1 ) ) return $one;
    if ( $numeric % 100 == 2 || ($numeric % 100 > 20) && ( $numeric % 10 == 2 ) ) return $two;
    if ( $numeric % 100 == 3 || ($numeric % 100 > 20) && ( $numeric % 10 == 3 ) ) return $two;
    if ( $numeric % 100 == 4 || ($numeric % 100 > 20) && ( $numeric % 10 == 4 ) ) return $two;

    return $many;
    }
    }

Post a Comment

Your e-mail is kept confidential and not included with your comment. Website is optional.