Loading...
 

HtmlAndDynamicPagesDoc

User Documentation

Well-designed portal systems let users freely edit HTML pages that can be displayed at the center section of the site by following a link on a menu, article or some site section. This can be used to construct sub-homes, presentation pages, help pages, ads, or anything you want.

In Tiki this is available and is extended further with dynamic pages. Let's start.

First of all, enable HTML pages from the main admin screen.

What are HTML pages?


HTML pages are editable (with the right permission) blocks of HTML that can be displayed verbatim at the center of a Tiki site by using a link such as the following:

tiki-page.php?pageName=soccer_results

Note that HTML pages are identified by their names so each must be unique.

You will be able to create two kinds of pages: static or dynamic.

Static versus dynamic pages


Let's start by saying that dynamic or static pages are edited and created without differences. The difference between dynamic and static pages is how the page is displayed to the user.

We'll let you know more about static & dynamic pages after learning how to edit HTML pages. After all, dynamic and static pages are edited in the same way.

Editing a page


To edit HTML pages follow the HTML pages link from the admin section of the application menu. A screen similar to the following one will be displayed:

insert graphic

Note that, to start, you just have to enter a name and the page content. The page content can be any HTML code with the addition of dynamic zones. Dynamic zones are portions of the HTML page that will be replaced by content taken from the database. For example, you can create the following HTML page

Soccer results <table>

<tr><td>Liverpool {ed id=liverpool}</td><td>Man UTD {ed id=manutd}</td></tr>
....

</table>

The syntax to include dynamic zones can be

{ed id=name} or {ted id=name}

the difference is what HTML element is used to edit the zone. ed uses text input boxes while ted uses textareas.


After creating the page and saving it you will see a link to content from the listing of pages. Clicking on content will take you to a screen where you can edit each dynamic zone on a page.

Important: when editing an HTML page line feeds are automatically converted to HTML <br/> tags


Note that both static pages and dynamic pages can use dynamic zones.

Applying templates for HTML pages


Note that you can choose to apply a template for HTML pages. This can be very useful to automate the creation of pages from an established template where you can indicate dynamic zones. To create a template for HTML pages go to the content templates section in the admin menu.

Editing dynamic zones for a page


This is a screen where you can edit the dynamic zones for a page:

insert graphic

Note that you just edit the zone and click update you can edit the zones from the listing directly or clicking on edit to individually edit a zone in a larger area.

Static and dynamic pages again


When a page is accessed using tiki-page.php?pageName=somepage the page will be rendered — replacing the dynamic zones by their values. If no value is found, then the zone is displayed as blank. Now is where the difference between a static or a dynamic page can be noticed.

For static pages, the page will be rendered and if the user wants to refresh the page to update dynamic zones the page must be reloaded by refreshing the browser as usual.

For dynamic pages the page will be automatically updated without refreshing at specified intervals (in seconds) that can be specified when editing a page. So if a page is dynamic the dynamic zones in a page will be updated without the user refreshing the window and without forcing the page to be reloaded. This is especially useful for "live" results, stock values, auction prices, etc.

How dynamic pages work


So how do dynamic pages work? Simple, in dynamic pages an invisible iframe is used along with the page. This invisible frame is reloaded at the interval specified as the page refresh rate. This invisible frame picks the values for dynamic zones from the database and, using javascript, updates the page's dynamic zones without regenerating the page.

Permissions


The following permissions can be used to control HTML pages.

insert graphic

Knowledgebase / tutorial / FAQ / How-to


TikiTeam

Who is working here generally? Link UserPage.

For more information

HtmlAndDynamicPages
HtmlAndDynamicPagesDev


Page last modified on Thursday 08 April 2004 04:07:45 GMT-0000

Upcoming Events

No records to display

Why Register?

Register at tiki.org and you'll be able to use the account at any *.tiki.org site, thanks to the InterTiki feature. A valid email address is required to receive site notifications and occasional newsletters. You can opt out of these items at any time.