{"id":26492,"date":"2010-01-14T16:20:24","date_gmt":"2010-01-14T20:20:24","guid":{"rendered":"https:\/\/www.bu.edu\/tech\/?page_id=26492"},"modified":"2013-04-11T13:55:12","modified_gmt":"2013-04-11T17:55:12","slug":"xml","status":"publish","type":"page","link":"https:\/\/www.bu.edu\/tech\/services\/cccs\/websites\/www\/non-wordpress\/marconi\/first\/xml\/","title":{"rendered":"About Telegraph Config (.xml) Files"},"content":{"rendered":"<p>Telegraph uses a separate XML-style configuration file to control form actions. To add a new action to a form (e.g., emailing form input), simply add a line of code for the corresponding <a href=\"https:\/\/www.bu.edu\/tech\/services\/cccs\/websites\/www\/non-wordpress\/telegraph\/directives\/\">Telegraph directive<\/a>.<\/p>\n<h3>Naming and Creation<\/h3>\n<ol>\n<li>Navigate to your form&#8217;s parent directory.<\/li>\n<li>Create a subdirectory named <strong>telegraph.<\/strong><\/li>\n<li>Navigate to the subdirectory <strong>telegraph.<\/strong><\/li>\n<li>Create a file named <strong>config.xml.<\/strong> (<strong>Note: <\/strong>you can rename this file according your needs; however, make sure that its name matches that contained in the <strong>form_configuration<\/strong> tag on your form:<\/li>\n<\/ol>\n<ul>\n<li><code>&lt;input type=\"hidden\" name=\"form_configuration\" value=\"telegraph\/config.xml\" \/&gt;<\/code><\/li>\n<\/ul>\n<h3>Formatting<\/h3>\n<p>The standard Telegraph directives follow a basic XML tag format:<\/p>\n<p><code>&lt;directive action=\"_____\" \/&gt;<\/code><\/p>\n<p>Make sure that your tag opens correctly and self-closes properly, in a valid markup format. Each directive should be placed on its own line; no other code needs to be added. Telegraph will ignore any information not contained within the configuration file&#8217;s XML tags.<\/p>\n<h4>Complex Tags<\/h4>\n<p>One of the simplest directives, Imperius, requires only a single parameter, the action:<\/p>\n<p><code>&lt;directive action=\"imperius\" \/&gt;<\/code><\/p>\n<p>A particular directive may require additional parameters, or allow them to be added for additional functions. The <strong>email<\/strong> directive, for example, requires the <strong>to<\/strong> parameter, indicating where the email is to be sent.<\/p>\n<p><code>&lt;directive action=\"email\" to=\"fred.flintstone@example.com\" \/&gt;<\/code><\/p>\n<p>You can also add additional parameters within a directive:<\/p>\n<p><code>&lt;directive action=\"email\" to=\"fred.flintstone@example.com\" from=\"[email] subject=\"Granite Orders\" template=\"orders.template\" \/&gt;<\/code><\/p>\n<h4>Special Directives<\/h4>\n<p>Special directives use the basic format:<\/p>\n<p><code>&lt;directive special=\"_____\" \/&gt;<\/code><\/p>\n<p>Aside from substituting <strong>special<\/strong> for <strong>action<\/strong>, they use the same format as the standard <a href=\"https:\/\/www.bu.edu\/tech\/services\/cccs\/websites\/www\/non-wordpress\/telegraph\/directives\/\">Telegraph directives<\/a>.<\/p>\n<h4>Additional Details<\/h4>\n<p>For additional details, see the <a href=\"https:\/\/www.bu.edu\/tech\/services\/cccs\/websites\/www\/non-wordpress\/telegraph\/how-to\/parameters\/\">complete list of directive parameters<\/a> and our set of <a href=\"https:\/\/www.bu.edu\/tech\/services\/cccs\/websites\/www\/non-wordpress\/telegraph\/examples\/\">Telegraph example code<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Telegraph uses a separate XML-style configuration file to control form actions. To add a new action to a form (e.g., emailing form input), simply add a line of code for the corresponding Telegraph directive. Naming and Creation Navigate to your form&#8217;s parent directory. Create a subdirectory named telegraph. Navigate to the subdirectory telegraph. Create a&#8230;<\/p>\n","protected":false},"author":1282,"featured_media":0,"parent":26097,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/26492"}],"collection":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/users\/1282"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/comments?post=26492"}],"version-history":[{"count":22,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/26492\/revisions"}],"predecessor-version":[{"id":64864,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/26492\/revisions\/64864"}],"up":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/26097"}],"wp:attachment":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/media?parent=26492"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}