Pages

A Soda page displays text, and can include uploaded images and views of the data in the sources. Most pages are editable pages that are created by users. There are also some pages that are automatically generated by the system.

Editable Pages

Editable pages are contained in workspaces. To create one, you must be logged in and working in a role that has write access to a workspace. Click the add button on the workspace page, select Page as the member type, and give the page a name.You can also set its read and write access levels.

Once the page has been created, there will be a link to it on the workspace page, visible to users with read access to it. A user who visits the editable page and has write access will see an edit button. Clicking on it will enable the user to edit the blocks on the page, set its title, set its template, and assign values to unknowns.

System Pages

There are some pages that are automatically generated by the system. These are:

  • The site main home page, accessed at the base URL of the Soda installation
  • A page for each connected source, accessed at the source URL
  • A page for each workspace (including sub-workspaces), accessed at the workspace URL
  • A page listing connected and available sources, accessed at /home/.sources relative to the base URL of the Soda installation
  • A page for each connected source, listing the named items on that source, accessed at /.items relative to the source URL
  • A page for each connected source, listing the named access levels on that source, accessed at /.levels relative to the source URL
  • An administration page for each named access level, accessed (for the level with name levelname) at /.levels/levelname relative to the source URL of the source of the access level.
The system pages provide facilities to create, update and delete resources. For example, workspace pages provide facilities to create editable pages. They also enable users to navigate through the system, to find pages, views, and uploaded files. Each editable page has a navigation index button. Clicking this button brings up the page of the workspace containing the editable page. From there, the user can go to sub-workspaces and other members of the workspace, to ancestor workspaces, to sources, or to the site main home page.

How Pages Work

Each page has a template that defines its layout, and typically has links to CSS stylesheets that set its style. The template is a file containing extended HTML. It is like a regular HTML file for a web page, but includes extra elements that are specific to Soda. In particular, it includes elements that place blocks on the page.

Each page can have its own template, but pages within a system usually share templates. The home source administrator can set the template for the site main home page. If this template is set, it will be used by all the pages that are automatically generated by the system. It will also be used by editable pages that do not have other templates set. A default template is used if no template is set for a page and the template for the site main home page is not set.

A block is a section of a page that can be created and edited by users. A block can contain text, views, graphics, video and other objects but (for security reasons) cannot contain scripts.

Blocks are defined as fragments of extended HTML, but a user creating or editing a block need not be aware of this. The HTML constructs and extensions are handled by a content editor program, so that the user just sees what will be displayed as a result of the edits.

When a browser requests a page for display, the server processes its template and replaces the extra elements that are specific to Soda by regular HTML. It fetches the blocks that are placed on the page, inserts them, and processes them to replace extra elements that are specific to Soda by regular HTML. This results in a regular HTML file that is returned to the browser for display.

Page Title

You can set the page title, which is shown in the browser navigation bar.

Page Unknowns

Unknowns are (as in elementary algebra) named quantities whose values are not known. (Because the values can vary, they are sometimes called variables.) Unknowns are used in the definition of views. You can assign values to unknowns that are used on a page, to affect the data that is displayed in the views on the page.

For example, you might hold a series of meetings and keep records of them with a page for each meeting. You could use a single participants view with a MEETING unknown on every page. You would then assign the appropriate value to the MEETING unknown on the page for a meeting, so that the page shows who was at that particular meeting.

Working With Pages

To create a page, you must have write access to a workspace. Go to the workspace page and click the edit button at the top. An add button will appear below the list of workspace members. Click it, enter the name of the new workspace member, and select its type as Page. Select its read and write access levels, and click the proceed button.

You can change the name and access levels of the page by clicking its settings button on the workspace page. You cannot change its type unless it has no blocks, unknown assignments, or other attributes. (If you meant to create a view, file, or workspace rather than a page, and have not yet started to define it as a page, you can change the type.) 

You can delete a page by clicking its delete button on the workspace page. Its blocks, title and unknown assignments will be deleted also.

To define a page or change its definition, go to the page and click the edit button at the top. You will then see addeditmove-up, and delete buttons that enable you to add, edit or delete its blocks, title, and unknown assignments. There will also be buttons that enable you to set or remove its template. If no template is set then a default template is used.