Page settings

From PhiWiki
Jump to: navigation, search
Page settings - database tab

All page related settings can be edited within this dialog.

Info

Pagesettings.png

Page ID

The page ID. This must be unique in the same site otherwise unpredictable results may occure. Phis caches pages for faster access and same page IDs will overwrite each other.

Title

The title of the page, which is translateable

See also: document.title.

Author

The author of the page (provided in the meta tags in HTML).

Company (publisher)

Your company name, if available.

Copyright (rights)

Copyright for this page.

Version (page-version)

Version of this page.

Keywords

Keywords for this page (provided in the meta tags in HTML).

See also: document.keywords.

Available languages for this page

In this tab you can define the supported languages for your page. If you loaded a Site config this will be already set.

See also: Translation.

Page

Pagesettingspage.png

Size

Sets a predefined page size in pixels.

Orientation

Sets the page orientation.

Background

Defines the background color of the page.

Custom size

If you need a special size check this box and enter the new dimensions of the page.

Position

v1.3.0 You can define if you want to center the pages or if the page should appear left aligned.

Mode

Browser

In Browser mode the Menu tab is disabled.

Application

The Application mode needs the PhiPlugin or PhiApp installed. In application mode the Menu tab becomes enabled. This offers to implement real applications with native window menus and the look and feel of the underlying operating systems.

Note: use phiapp with the URL as first parameter to start directly in application mode. This enables you to create applications without any browser and even better: it runs on every operating system, where the PhiPlugin or the PhiApp is supported!

Default font

Sets the default font used for all standard text in the page.

Note: the font must be available on the server and client side otherwise a replacement font from the same family is choosen. Avoid to use exotic fonts.

Icon

This icon is set as the application icon (visible if the PhiPlugin is running and in the application mode) or as the favicon in HTML mode.

Menu

Pagesettingsmenu.png

In Application mode you can setup a drop down menu structure otherwise this tab is not selectable.

Menus should be defined in a Master template page. If the page defines its own menu the menu of the Master template will be overwritten. You can use phi.menu in JavaScript to change the menu hierarchy at runtime.

Menu item structure

Use the arrows on the right side to create the menu hierarchy. A top level item appears in the menu header with its children as the drop down menu. Submenus can be created easily by entering the next hierarchy (clicken on the right arrow).

Icon

Each child can use its own icon.

Text source

If you need another Text source like translation or database click on this button. Static text can be changed by directly double clicking on the text of the menu item.

Separator

Adds a separator.

Add

Adds a new item in the current hierarchy of the selected item.

Delete

Deletes the currently selected menu item.

Checkable

Makes a menu item checkable.

Disabled

Disables the currently selected menu item.

Colors

Pagesettingscolors.png

Here you can define often used colors and the palette you want to use for your page. If you loaded a Site config this will already be set, however you can overwrite the settings.

If you choose your own palette the background colors of input elements will not be shown in HTML since they will cause the browser to render a flat element. If you really want to change the background color also in HTML use CSS instead.

In some operating environments (depending on the style and system) the background color of buttons can not be overwritten by setting the appropriate palette color. If you want to force a background color for buttons, you may use a CSS style.

Use custom palette

If Use custom palette is unchecked, the default palette and current style of the operating system of the user viewing this page is used.

Note: the color role Window of the palette can not be changed and is always set to transparent.

See also: Template page overwrites palette.

Custom color

You can define six custom colors which will be available in the properties tool box with their lighter counterparts (100%, 80%, 60%, 40%, 20%).

Note: if you have a Site config loaded this will be preset for every new page.

Meta

Meta.png

This tab provides settings for a Master template page, the URL where to send the FORM data, the HTML setting of the Phi object tag and Session management.

Use template

If the page should display a corporate page in the background (which can include menus) enter the path to the Master template page here.

Check Template page overwrites this page palette if you want to use the defined palette of the template.

Form action

If your page provides a formular check the Form action checkbox and enter the URL which is processing the FORM POST data.

See also: document.action.

Open graph

v1.3.0 Click on the Edit button to add special open graph properties as meta data (usually used with Facebook).

See also: document.openGraph.

HTML

If you check Suppress creation of Phi object tag the server will generate the HTML version only. This is useful for all introducing pages as long as you don't want to bother users with the notice that they need the PhiPlugin.

v1.3.0 If you check Force HTML output the server will always generate native HTML code even if a browser understands Phi. This is necessary for example if you want to use the jQuery backend directly. However this breaks all advantages the PhiPlugin offers.

Session management

Here you can define settings if the page needs Session management.

CSS

In this tab you may define a page wide cascading style sheet.

If you do not check the Generate system CSS, the predefined palette of the page (like link and text colors) will not apply. You have to provide your own settings instead.

Note: all generated CSS files are located in the temporary directory of the Phi server.

JavaScript

Here you can enter the JavaScript part which is executed in the browser. Remember: you may select different Text sources for Javascript.pngJavaScript.

ServerScript

Here you can enter the Serverscript.pngServerScript which will be executed in the server environment (before the page will be sent to the client). Phi uses Server modules as a replacement for PHP or ASP and offer an easy to use JavaScript API - a programming language less to learn. You can even program your own modules (written in Qt/C++) and extend the Phis server.

Database

In the Database tab you may add support for a database for your page. You can specify a file (with the ':' as separator of each entry) or with the settings stored along with the *.phis page.

See also: Database support.