Customize existing webframe package

The process of completely customizing a webframe is quite similar to the process of creating a new one from an existing package. To do that you need to

Download the original webframe package

browse software packs
  1. Log in to the WordFrame Integra Core Administration
  2. Click on the "Architect" tab in the upper left corner
  3. Click on the "Software management" menu in the main navigation bar
  4. Click on the "Customize packages" link in the "Software packages" section on the left of the screen
  5. Click on the "Webframes" tab
  6. Click on the "download" link of the package you need to customize
  7. If the package is not in this list, you need to install it first

Extract the webframe package contents

You can extract the package contents by using a simple unzip program. More about the wfpack.* files you can learn on this page. You need to additionally extract the repository.zip file to access the actual source code and configuration files.

The WebFrame Package folder structure and files

The standard folder structure of the webframe package look like this:

  • wfpack.info (the xml file with the pack meta details)
  • wfpack.signature (the pack integrity signature and vendor public key)
  • repository (the pack contents stored as .zip archive in the pack)
    • my-files ( (optional) you can create your own folders to hold any files you may need)
    • controls ( (optional) we often use such a folder to hold our controls we may need)
      • control.ascx ((optional) the static control presentation template)
      • control.ascxv.cs ((optional) the control's code behind file)
    • WebFrame.ascx (the webframe's static presentation template)
    • WebFrame.ascx.cs (the webframe's dynamic code behind)
    • WebFrame.config (the webframe's configuration file and default values)

Description of the WebFrame pack files

wfpackage.info file

You can read more about this file on this location

 

wfpackage.signature file

You can read more about this file on this location

 

WebFrame.ascx

This is a standard ascx file which describes the presentation of the webframe's content. You can get plenty of examples from other already developed webframes, as the all are distributed open-sources under GPL v3 license.

In these files there is one important element that is specific and you should remember:

  • - this property can be used in the aspx file to reference the path to the webframe's installation folder and repository. With its help you can reference your own files that are distributed within the package.
    <img src="<%=WebFrameHomeDirectory %>/myfile.png"/>
    

WebFrame.ascx.cs

This is the dynamic code behind file of the webframe. It will be later compiled by the platform upon its first usage. Here you can also refer to the installation path of the webframe with:

ctrlWebFrameSystemSettings.WebFrameHomeDirectory = "/" + webFrameRootPath;

WebFrame.config

This file holds the default and initial configurations and settings of the webframe. It look like the example below.

<?xml version="1.0" ?>
<webframe>
	<settings/>
	<ui-settings>
		<manage-form>
			<form-title>
				Blog | Administration webframe
			</form-title>
			<page-help>
        help_blogITBrix.Blog.Administration webframe management
      </page-help>
			<tip-box>
			</tip-box>
		</manage-form>
		<settings-form>
			<form-title>
				Blog | Administration webframe
			</form-title>
			<page-help>
        help_blogITBrix.Blog.Administration webframe specific settings
      </page-help>
			<tip-box>
			</tip-box>
		</settings-form>
	</ui-settings>
	<allowed-applications>
		<application>
			<software-id>3A5D627F-9041-46D0-BC5A-AD87B2E0E701</software-id>
		</application>
	</allowed-applications>
</webframe>

Apply the needed changes to the source code and the configurations

You can change all the files according to your needs. If you need to test the webframe, you need to install it under new name or new version. Remember that you will not be able to update other vendors' webframes, as they will be signed with their unique key.

Build the new webframe package

To build the new webframe package you need to following this steps:

  1. Create the repository.zip file. Zip the repository folder contents. Remember that the WebFrame.ascx, WebFrame.ascx.cs, WebframeSettings.ascx, WebframeSettings.ascx.cs and WebFrame.config files should be present and not in a subfolder.
  2. Alter the contents of the wfpack.info file. You need to carefully change the wfpack name, versions and author. If there is an error here, especially in the pack version, it could prevent it from being installed or updated(if the version is not incremented)
  3. Delete the wfpack.signature file. It needs to be regenerated or not present, in order to correspond to the new contents and pack author.
  4. Archive with a zip program the repository.zip, wfpack.info and wfpack.signature(if you have the tools to generated it. Remove it otherwise)
  5. Name the new webframe pack according to the WordFrame Integra pack naming convention