Advanced

ADRUID ADVANCED SECTION

Composed component

A Composed component is a graphical container component which displays a list and which can contain other components. This component is useful for options requiring a bloc definition such as directory, location and virtual hosts options. (screenshot)

A composed component is characterized by a BEGIN COMPOSED/END COMPOSED section. It contains a BEGIN DESCRIPTION/END DESCRIPTION section analog to the BEGIN LIST/END LIST section of a list component.
Then follows any number of component descriptions (at least one). They can be of any type including composed components. It means that a composed component can contain itself a composed component. Options contained in a composed component are accessible by pressing the Options button next to the list.

Then follows a GENERATE section indicating what to generate and in which file this information should be generated
(BEGIN GENERATE YourFileName)

The GENERATE section of a composed component is divided into two parts (HEAD and TAIL). The generation is done in the following order :

  1. Head
  2. Contained components generation
  3. Tail
It allows the generation of structured options such as :
<VirtualHost www.essi.fr>

DocumentRoot /www/docs

<Directory /www/cgi-bin>
Options ExecCGI
</Directory>

</VirtualHost>

Example :

BEGIN COMPONENT
TITLE: Virtual hosts

BEGIN COMPOSED
BEGIN DESCRIPTION
LABEL: Virtual host
ID: %arg1
END DESCRIPTION

### beginning of a text component
BEGIN COMPONENT

TITLE: Properties

BEGIN TEXT
LABEL: Server admin (email) :
ID: %arg1

LABEL: Document root :
ID: %arg2

LABEL: Error log :
ID: %arg3

LABEL: Transfer log :
ID: %arg4

END TEXT

BEGIN GENERATE httpd.conf
ServerAdmin %arg1
DocumentRoot %arg2
ErrorLog %arg3
TransferLog %arg4
END GENERATE

END COMPONENT

### Beginning of a text component
BEGIN COMPONENT

TITLE: Server name

BEGIN TEXT
LABEL: Server name :
ID: %arg1
END TEXT

BEGIN GENERATE httpd.conf
ServerName %arg1
END GENERATE

END COMPONENT

END COMPOSED

BEGIN GENERATE httpd.conf
BEGIN HEAD
<VirtualHost %arg1>
END HEAD

BEGIN TAIL
</VirtualHost>
END TAIL
END GENERATE

END COMPONENT