Project

General

Profile

How do I set up different pages?

Added by Omer Katz over 14 years ago

In Wt how do I code different pages?

Should I create two containers and switch between them?

How can I create a login page that no one can pass unless authenticated?


Replies (1)

RE: How do I set up different pages? - Added by Wim Dumon over 14 years ago

Hi Omer,

(1) and (2): By use of the Internal Path API. The wt-home example shows how we use it in our homepage, and the WMenu source code (WMenu.C in our source distribution) can be used as an example of how to use the internal path. The reference documentation contains more explanation of the internal path API (most of this API resides in the WApplication class).

(3): Only instantiate a login widget where the user can enter his credentials. Do not create anything else of your application. The user will not be able to access something that does not exist within his session.

Wim.

    (1-1/1)