1. In the custom component directory, create a folder “publish”. Files that are placed within this folder will become relative to the weblayout folder.
2. In Component Wizard -> Build -> Build Settings, add a “Component Extra” entry type and link to the above path (customComponentName/publish/).
<td><$doPublish = 1$></td>
- The first <td> represents the source folder to publish
- The second represents the path, relative to weblayout, to place the files
- The third represents the “class” that controls the publishing and processing of the content
- The fourth is the loadOrder and should be set to 1000 (which is the highest available)
- The fifth is doPublish. This is a string of iDocScript that can be used to determine whether or not this set of files should be published. You can do fancy things like construct time of day, week or month to conduct publishing.
- The sixth (canDeleteDir) should be set to 1.
<td><$doP:ublish = 1$></td>
Note: If you have problems with the files publishing (for example they should publish on start-up) you can manually invoke this action by invoking Administration -> Admin Actions – > Weblayout Publishing -> Publish static, string and dynamic files. This will likely take a few minutes to complete.
| || || |