interactivetools.com
Quickstart Guide...
How to Install
How to Upgrade
How to Move Servers
How to Private Label
Restore Hacked Sites
Getting Started
In-Depth Getting Started Guide
Working With Generated Code Guide
Viewers
Viewer Options
Displaying Uploads
Search Engines
Special Fieldnames
Admin Menu
General Settings
Private Labeling
User Accounts
Section Editor (List)
Add New Editor
Section Editor (Edit)
Field Editor
Text Field
Text Box
Wysiwyg
Date/Time
List
Checkbox
Upload
Separator
Regional Settings
Code Generator
Show Code

View Changelog »
Glossary
Need Help? Questions?
Post in forum »

Admin > Code Generator

Using the Code Generator, you can quickly create some customized code for your index page and detail page viewers.

Below we will go through the steps to create the code for a News List page and Detail page.

Steps to create a News List (index) page:

  1. Choose News from the Select Section dropdown list and choose the Viewer Type radio button for List page. This will publish a page that shows a list of one or more records.
  2. Choose the Viewer Options for your "News" index. For example, in the "How Many" section, I will select the radio button for "Show 10 records per page..." and replace 10 with 5. Now the News index is limited to 5 records per page (with prev $amp; next page links).
  3. After all options are selected, click the "Show Code" button to generate the code.

Steps to create a News detail (article) page:

  1. Choose News from the Select Section dropdown list and choose the Viewer Type radio button for Detail page. This will publish a single record.
  2. Choose the Viewer Options for your "News" detail page (see . The default options are used in most situations but additional options are available for sites with unique requirements.
  3. After all options are selected, click the "Show Code" button to generate the code.

Note:The Viewer Options for List Page and the Viewer Options for Detail Page are different. See below for more details.

Create New Viewer

Select Section
From the dropdown list, choose the section to generate PHP code for. The section list includes all the sections you have created.
Viewer Type
List page - show a list of one or more records. The List page viewer type can be used to generate code for an index pages.
Some example index pages: news, blog, faqs, quotes, job listings etc.
Detail page - show details about a single record. The Detail page viewer type can be used to generate code for single pages.
Some examples of single pages: news story, blog post, featured client, about us page, contact page etc.
Viewer Options for List Page

How Many
Show all records - displays all the records from the section on one page
Show the first # records only (replace # with the number of records that you want to show)
Show # records per page with prev & next page links (replace # with the number of records that you want to show per page)
Record Sorting
Default - use same sorting as editor (recommended)
Random - show records in random order
Advanced: Use this MySQL "Order By" clause (example: "date DESC, title")
Show uploads
Leave this box checked to output the code to show file uploads on your viewer page.
Allow Searching
Filter results based on search form input (disable for multiple viewers on one page)
Filter Results
Advanced: Only show results that match this MySQL "Where" clause
Code Generator for List page
Viewer Options for Detail Page

How Many
Show all records - displays on the records that are
Show the first # records only
Show # records per page with prev & next page links
Record Sorting
Default - use same sorting as editor (recommended)
Random - show records in random order
Advanced: Use this MySQL "Order By" clause (example: "date DESC, title")
Show uploads
Leave this box checked to output the code to show file uploads on your viewer page.
Code Generator for Detail page
After choosing the Section, Viewer Type (either List Page or Detail Page) and Viewer Options, click the "Show Code >>" button to generate the PHP code.
Copyright © 1999-2024 interactivetools.com, inc.