iphlex systems creating new page groups
iphlexwebphlexdocumentation > creating new page groups
show contents
hide contents

 

 

Because of the flexibility of webphlex, there's no one right way of building a particular web site. It is left very much up to the user to decide exactly how much of a page goes into one element, and exactly what information should be stored in the elements as opposed to in the page templates.

For this reason there isn't a way of automatically reading an existing web site into a webphlex database. Future versions may contain a semi-automated wizard system for this purpose, but for the moment the job has to be done manually. The following guidelines should make it a fairly easy job for most web sites:

top of page
creating the new page group

First create an new, empty web page group as described in building a page group from scratch.

Replace the entire contents of the main page template (on page 'main page') with the entire contents of the HTML file you want to reproduce in webphlex.

On the elements subscreen (on page 'elements'), click button 'new record'click for more information about this button ) followed by button 'write current record to disk'click for more information about this button ) to create an empty element.

On page 'main page', click button 'preview main page in browser'click for more information about this button ). The first main page will be generated and written to a file called '~temp.html' in the local page group location. If any external files used in the page (e.g. images, CSS and Javascript files) are correctly located relative to this location, the page shown should look exactly like the original.

see also:

top of page
creating the first element

Now choose a part of the template contents which you think ought to constitute one element. This might be the HTML code showing an image, along with any text (titles, etc.) and formatting information which belong to that image. In a text-based page it might be one paragraph of text, along with related HTML statements. Generally speaking, if the same sort of data is repeated many times on a page, this data will make a good element. If data is held in tables, for instance, it is often most useful to make each row of the table (everything between the statements <TR> and </TR>) an element.

Using the mouse on the main page template field, select the text which is going to form an element, cut it (by typing <Ctrl> X or by right-clicking and selecting 'Cut'), and replace it with the text #ELEMENTS#.

Paste the text you've just cut into the element template field of the empty element you created earlier (go to page 'elements', then click on 'template' lower down the screen).

If you now click button 'preview main page in browser'click for more information about this button ) (on page 'main page'), you should see a page identical to the last one you previewed.

see also:

top of page
creating more elements

You can now gradually create new elements to replace parts of the main page template.

See section 'building elements' for tips on how best to do this.

If you're converting a web page containing a lot of (image) files, and have created elements based on the files on disk (using button 'add element records for file(s)' on page 'tools'), you can now sort them into the same order they were in on the original web page using the button 'sort element records' on page 'tools'.

Although there are no hard and fast rules about it, templates (both at page and element level) should generally describe the form of a web page, all the content being elsewhere. Ideally a template should never contain any data which isn't the same for all languages - if a template is stored in a text block (which is useful if it is used in more than one place), it should have only one language version, for language *ALL.

see also:

top of page
converting the main page

Anything which could be described as content (as opposed to form), and certainly anything which would have to be translated for different language versions of the page, can now be moved from the main page template to fields in the page group record, and replaced with the appropriate replacement codes.

For instance: suppose the main page template starts like this:

<HTML>
<HEAD>
<TITLE>creating new page groups</TITLE>
</HEAD>

Use copy, cut and paste to move the text creating new page groups to field 'page title for browser' on page 'general 1', and replace it with the text #TITLE#, which can be found on the screen, just to the left of field 'page title for browser', and can be copied from there. The main page template now starts like this:

<HTML>
<HEAD>
<TITLE>#TITLE#</TITLE>
</HEAD>

Ideally, by the time you've finished, the template shouldn't contain any data which isn't the same for all languages - i.e. if you store it in a text block it should have only one language version, for language *ALL.

Apart from that, it's entirely up to you what you leave in the template and what you move elsewhere. E.g. the template might contain a copyright notice or a mail address, which do not need translation. If, however, you want to use the same data in several places, or even in several different page groups, it can be useful to replace them by replacement codes.

see also:

top of page
creating the detail page

If the page group is to contain detail pages, copy the entire contents of the HTML file you want to reproduce in webphlex into the detail page template (on page 'detail page'), and proceed as described for the main page.

If the detail page contains a link back to the main page from where it was called, replace the URL by the code #PAGE_URL#.

see also:

top of page
creating extra pages

If any extra pages are needed, they can be created manually as described for the main and detail pages.

If an extra page looks in any way similar to the main page or detail page, however, it is often much easier to copy data from these pages using the button 'copy details from page group to this record' ) on page 'general' of the extra pages subscreen.

Note that the data available for copying depends on the type of extra page being copied to. E.g. if the extra page is to be generated for each main page, the main page template can be copied to the extra page, whereas if it is to be generated for each detail page, it is the detail page template which is available for copying.

see also:

top of page
iphlexwebphlexdocumentation > creating new page groups Copyright © 2006 iphlex systems