Open Power Template
Next
Open Power Template
Reference manual - version 1.1.3
Tomasz
Jędrzejewski
Tomasz
Szczupliński
Copyright © 2006-2007 Tomasz Jędrzejewski, Tomasz Szczupliński
Table of Contents
Preface
1. Installation
1.1. Simple installation
1.2. Advanced installation
1.3. OPT API
2. Template syntax
2.1. Introduction
2.2. Comments
2.3. Blocks and variables
2.4. Expressions
2.5. Functions
2.5.1. apply()
2.5.2. array()
2.5.3. capitalize()
2.5.4. count()
2.5.5. countWords()
2.5.6. cycle()
2.5.7. date()
2.5.8. length()
2.5.9. lower()
2.5.10. parseInt()
2.5.11. trim()
2.5.12. upper()
2.5.13. wordwrap()
2.6. Tags
2.7. Instructions
2.7.1. Section
2.7.2. Tree
2.7.3. Pagesystem
2.7.4. Conditions
2.7.5. Separator
2.7.6. Var
2.7.7. Include
2.7.8. Place
2.7.9. Default
2.7.10. Capture
2.7.11. For
2.7.12. Foreach
2.7.13. Php
2.7.14. Literal
2.7.15. Dynamic
2.7.16. Bind
2.7.17. Insert
2.7.18. BindEvent
2.7.19. BindGroup
2.8. Components
2.8.1. Defined components
2.8.2. An undefined component
2.8.3. Component tag reference
2.8.4. Component reference
2.9. XML-Syntax Mode
2.10. Master templates
3. Library reference
3.1. optClass class
3.1.1. Class fields
3.1.2. assign()
3.1.3. assignDynamic()
3.1.4. assignGroup()
3.1.5. assignRef()
3.1.6. cacheReset()
3.1.7. cacheStatus()
3.1.8. cacheUnique()
3.1.9. compileCacheReset()
3.1.10. error()
3.1.11. fetch()
3.1.12. getStatus()
3.1.13. header()
3.1.14. httpHeaders()
3.1.15. isCached()
3.1.16. loadConfig()
3.1.17. loadPlugins()
3.1.18. parse()
3.1.19. parseCapture()
3.1.20. registerComponent()
3.1.21. registerDelimiter()
3.1.22. registerFilter()
3.1.23. registerFunction()
3.1.24. registerInstruction()
3.1.25. registerInstructionFile()
3.1.26. registerNamespace()
3.1.27. registerPhpFunction()
3.1.28. registerResource()
3.1.29. setDefaultI18n()
3.1.30. setMasterTemplate()
3.1.31. setObjectI18n()
3.1.32. unregisterFilter()
3.1.33. unregisterNamespace()
3.2. optCompiler class
3.2.1. Class fields
3.2.2. __construct()
3.2.3. compileExpression()
3.2.4. dynamic()
3.2.5. out()
3.2.6. parametrize()
3.2.7. parse()
3.3. optNode class
3.3.1. getBlockCount()
3.3.2. getFirstBlock()
3.3.3. getName()
3.3.4. getParent()
3.3.5. getType()
3.4. optBlock class
3.4.1. getElementByTagName()
3.4.2. getName()
3.4.3. getParameters()
3.4.4. getType()
3.4.5. hasChildNodes()
3.4.6. hasParameters()
3.5. optInstruction class
3.5.1. Class fields
3.5.2. configure()
3.5.3. defaultTreeProcess()
3.5.4. findSnippets()
3.5.5. instructionNodeProcess()
3.5.6. nodeProcess()
3.5.7. processAttribute()
3.5.8. processOpt()
3.6. optException class
3.6.1. __construct()
3.6.2. getFunction()
3.6.3. getType()
3.7. ioptI18n interface
3.7.1. apply()
3.7.2. put()
3.7.3. putApply()
3.7.4. setOptInstance()
3.8. ioptComponent class
3.8.1. __construct()
3.8.2. begin()
3.8.3. end()
3.8.4. push()
3.8.5. set()
3.8.6. setDatasource()
3.8.7. setOptInstance()
3.9. ioptPagesystem class
3.9.1. getPage()
3.9.2. nextPage()
3.9.3. prevPage()
3.9.4. firstPage()
3.9.5. lastPage()
4. Tutorials
4.1. I18n and OPT
4.2. Output caching
4.3. OPT Toolset
5. Extending OPT
5.1. New functions
5.2. New resources
5.3. New filters
5.4. New components
5.5. New instructions
5.5.1. Compiler overview
5.5.2. Your first instruction
5.5.3. Parameter parsing
5.5.4. Handling OPT_UNKNOWN nodes
5.5.5. Handling OPT attributes
5.5.6. Handling $opt special block
5.5.7. Other features and tricks
5.6. OPT plugins
5.7. OPT API
A. Migration from Smarty™
B. Configuration directives
The configuration
C. Code debugging
D. Error codes
E. Problems
F. Support
G. Bug reporting
H. In the next release
I. Authors and license