-
Welcome
-
Client Services
-
Getting Started
- First Login
- Setting up your menu
- Setting your default application
- Using The Block Manager
- Getting the look right
- Giving your staff access
-
Community in the Cloud
-
Migrating From Another Platform
-
Members and Groups
-
Member Functions
-
Staff and Moderation
-
Security and Rules
-
Promotion
-
Monetization
-
Community Enhancements
-
How to use Invision Community
-
Managing Your Community
-
Content Discovery
-
File Management
-
Member Preferences and Features
-
-
Community Core
-
Forums
-
Basics
-
Settings
-
Tips & Case Studies
-
-
Gallery
-
Basics
-
Settings
-
Tips & Case Studies
-
-
Downloads
-
Basics
-
Settings
-
Tips & Case Studies
-
-
Blog
-
Basics
-
Settings
-
Tips & Case Studies
-
-
Events
-
Basics
-
Settings
-
Tips & Case Studies
-
-
Pages
-
Core Concepts
-
Basics
-
Basic Tutorial: Building a recipe section
-
-
Advanced Tutorial: Recreating the "Release Notes" section
-
Tips & Case Studies
-
Design
-
-
Commerce
-
Getting The Basics
-
Products & Purchases
-
Providing Support
-
-
Themes and Customizations
-
Getting Started with Themes
-
Advanced Theming
-
Languages and Localization
- Introduction to languages
- Installing a ready-made language pack
- Setting the default language
- Creating a new language pack
- Translating using the visual language editor
- Translating using the standard editor
- Plural phrases
- Replacements in phrases
- Exporting a language pack you have created
- Changing date formats
-
Editor and Emoticons
-
Tips & Tricks
-
Template syntax
-
Javascript Framework
-
Introduction to the framework
-
Using UI widgets
- Introduction
- ips.ui.alert
- ips.ui.autoCheck
- ips.ui.autoComplete
- ips.ui.captcha
- ips.ui.chart
- ips.ui.dialog
- ips.ui.flashMsg
- ips.ui.hovercard
- ips.ui.infinitescroll
- ips.ui.lightbox
- ips.ui.menu
- ips.ui.pageAction
- ips.ui.pagination
- ips.ui.rating
- ips.ui.grid
- ips.ui.sideMenu
- ips.ui.spoiler
- ips.ui.stack
- ips.ui.sticky
- ips.ui.tooltip
- ips.ui.truncate
- ips.ui.selectTree
- ips.ui.tabbar
-
Using utility modules
-
-
CSS Framework
-
Sidebar and Widgets
-
-
Advanced Options
-
Classic Installation / Server Management
-
Configuration Options
-
IPS Connect
-
-
Other
Template syntax
-
Introduction to template syntax
What problem does HTML logic solve? In the IPS Community Suite, our templates are the 'view', i.e. how the data is rendered as HTML to the screen. However, basic HTML has no logic capabilities; what is in the HTML file is what is sent to the browser. In a complex application like ours, we need some way to make decisions about what is output. These decisions could potentially be made in the PHP backend, but that isn't appropriate in most ca -
Using expressions in logic
As mentioned in the first step, any valid PHP expression can be used in HTML logic tags. You'll often just be checking if an expression is true or false: {{if $value}} ... {{endif}} ...but there are many other possibilities. You can also use normal PHP functions in your expressions. For example, you may need to determine if an array has any items, so PHP's count function is appropriate: {{if count( -
if/elseif/else logic
The most basic logic check is a simple if/else. This allows you to put HTML if a condition matches, or something else if it doesn't. The syntax is simply: {{if [expression]}} HTML to output if expression is true {{else}} HTML to output if expression was not true {{endif}} There's also an elseif tag which allows you to specify other conditions to check if earlier conditions d -
Loops
Standard PHP loop types are supported as HTML logic tags. Foreach {{foreach [expression]}} ... {{endforeach}} Expression is anything PHP would support in a loop. The variables the loop defines are available within the body of the loop: <ul> {{foreach $arrayOfItems as $id => $item}} <li>{$id}: {$item}</li> {{endforeac -
Variables
Each template bit can have variables passed into it by the backed PHP code, and these variables can be used by the template bit to control the display. Consult either the template editor or designer's mode guides (depending on your preference) to find out how to determine which variables are available to a template. As well as these local variables, you can access the various objects created by the IPS4 PHP framework. & -
Template plugins
It's often useful to transform raw values in some way, and this is achieved in IPS4 with template plugins. Template plugins take a value, and optionally some arguments, and output some transformed value. The syntax for template tags is: {pluginkey="<value>" argument="..."} The value can be a normal string, or it could be a variable coming from elsewhere. Template plugins can always be used in templates, but some can also be used in CSS files. Those that can are identified -
Using arbitrary PHP in templates
It is possible to use arbitrary PHP in your templates. Generally this is discouraged, but in some situations a simple statement can be of benefit to initialize a variable or aid debugging (for example). Note: templates also support a special expression template tag; consider using this tag in favor of arbitrary PHP. We cover the tag in a later step of this guide. To use PHP, you can enclose your statement in double-curly parenthesis, like