Menu

<TextField>

Designed for front-end developers who are looking for the simplest tool to build dynamic websites. You write the markup, and thanks to a few variables you can make the whole contents editable, since provides an actual dashboard to your client.

Scroll

Have a look to the shortest documentation ever, and once you have finished, <TextField> will become your best friend 😍.

WATCH This video for an overview.

Installation

You've just downloaded the archive, now copy paste the TextField/ folder contents to your project root directory. This is it, you've just installed CMS!

stores the data on .json files and does not require any SQL access. requires PHP8 to work. Create your theme in themes/ folder and add "tpl/" before all your relative paths into your HTML files. The root is set by the the index.php file. Access the panel opening ./panel/ on your webserver. The default password is 0000. Try out the demo panel! The password is the default one.

Build the data tree

The data is divided in 2 types of elements:

  • Static contents which are single fields. Example: the description of the website.
  • Flows which are sets of items. Example: a portfolio. Items of a flow share the same fields.

It's suggested to create a .json file for each independent part of your website to avoid useless loads. Example: the portfolio and the about text are stored in home.json and the blog in blog.json.

Load your theme

Open index.php then change the load() .json data file path and the tpl::parse() .html template file path to match with yours. You can load or parse more than one file by duplicating the lines.

If you want to create a separate page, copy paste the index.php file in the same directory then edit the file name and the data and template files path.

From now on, links between pages must call .php root files.

Inject the data

In the panel, you have the matching variable name under each field and each flow. Call a simple variable to display its value: {about_text}. Use the following syntax for flows:

{item in $articles} <!-- "item" is a prefix to avoid conflicts and could be named as you want -->
    <h2>{item_title}</h2>
    {item_text}
{end}

To set a conditon, use this syntax:

{if /*PHP syntax here, you have access to all the variables*/}
    <!-- content -->
{elseif /*PHP syntax*/}
    <!-- content -->
{else}
    <!-- content -->
{end}

Want to do more? uses Templite engine, read its short documentation.

Extra contents

An automatic variable is set to each item of a flow, called $id. Its value is the specific zero-based number of the item.

Variables have not always simple text value. To help, some field types automatically create extra variables: date, image... Just open the source in your browser to see the available variables and their content at the end of it.

Sort and filter flow items

{prefix in sortFlow($flow, 'id')}...{end} sorts a flow by item $id ascendant.
{prefix in sortFlow($flow, 'id', true)}...{end} sorts a flow by item $id descendant.
{prefix in filterFlow($flow, '$id <= 3')}...{end} selects the items which id is 3 or less. Use PHP syntax and the items variables to write conditions.
{prefix in sortFlow(filterFlow($flow, '$id <= 3'), 'id', true}...{end} both filters and sort matching items.

Publish

First, turn off the developer mode in the panel to freeze the data tree by editing ./panel/index.php. A comment will help you on line 8.

Then, turn into comment the tpl::fix() line of each PHP root file you have created to hide the variables list.

Finally, turn the cache on for each PHP root file to increase performances and prevent from misclicks on the panel. A comment will help you on line 3. Just click on 'Publish' in the panel each time you want the website to be refreshed.

Templite

Templite is a PHP template engine, designed to be as powerful as optimized, light and easy-to-use.

The amount of features makes it a real solution for your website: you would be able to separate data processing from displaying in the most comfortable way. It's only 4ko of pure cleverness created to enhance your productivity.

Any feature has been omitted from an usual template engine. That's the strength of Templite: you can do everything, with the best performance.

Soft syntax

The syntax has been made as instinctive as possible so you have both the best reading and writing comfort on your template files.

Infinite nested blocks

Create as many levels of blocks as you need and easily unfold them without any conflict thanks to custom prefixes.

Conditions

Variables are extracted in the template file, so it becomes easy to write conditions with a native PHP syntax in a custom syntax structure.

Functions and more

Native PHP is enabled in template files, so it's possible to apply functions to variables and manipulate them.

Translations

Translate some texts of your website using Templite custom language files. If a text hasn't a matching translation, it will be displayed unchanged.

Clever inclusions

Include template files straight from template files. Even include, a file will be compiled separately to be ready for a second call.

Best performances

Loaded in only 0.1ms, Templite compiles a strong template file in less than 5ms and displays it in some 10ms, without cache!

Complete global cache

Each page will be cached for each combination of superglobals values. You can also set custom parameters and an expiration time.

Clean code & paths

Unlike the majority of template engines, Templite provides a beautiful code and preserves your relative paths, based on the PHP calling file directory.

Debug

It becomes easy to fix a bug when you have a complete list of set variables and blocks, displayed in a comment in the source of your page.

Background dev mode

Templite will automatically overwrite the compilation file of an edited template or language file.

Light as a feather

All those stunning features fit in a 4ko script. Incredible, isn't it?

Buy <TextField> CMS

See License Agreement for full terms and conditions. For inquiries about licensing, billing and secure payment processing, please, use support@textfield.org.
One time-payment, not a subscription.

Pro

€199

Inc. VAT

You are a team/developer and you create websites for your clients or you have a hosted web service with the subscription or Intranet site.

  • Unlimited developers
  • Unlimited domains
  • Unlimited sub-domains
  • Full access to source code
  • Free updates for current major version
  • 50% discount for the next major version
  • Technical support by email
Buy Pro

Safe and Secure payments are processed by Paypal.com.
We do not store or see your credit card data.
Payments