Add CMS-Editable Lookup Text to Your Code Pages
Need to add text to a code page while retaining the ability to edit the text through the CMS? Here is where text lookup comes in.
1. Make sure the code page includes the text_lookup component.
- Near the top of the code file there should be a line--starting with "Fakoli:using"--that lists the components to which the code needs to have access. Make sure that "text_lookup" is among them.
Example: Fakoli::using("text_lookup", "project_database", "taxonomy");
2. In the CMS, create a text lookup entry.
- Navigate to Classification > Text Lookup and click "Add a Text Lookup".
- Enter a code (all lowercase, separated by underscores if needed, such as "procurement_intro") to identify the text, and the text itself.
3. Insert the lookup text code in your code file
- Back in your code file, add a line of code inserting the lookup text at the position where you want the text to appear.
Example: echo TextLookup::getText("procurement_intro");
Enabling and tracking user feedback »
« Application Settings