You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,13 @@ Manage site-wide modules (aka widgets) and select the pages on which they are to
20
20
# Usage
21
21
22
22
### Create a module area
23
-
1. Within the *Module Manager* admin, create a new ModulePosition object. The `Alias` field will be automatically generated, or you can enter your custom alias name.
23
+
1. Edit your `mysite/_config/config.yml` file to add any additional module areas. Use the following format:
24
+
```
25
+
ModuleManager:
26
+
positions:
27
+
- 'module-name-here'
28
+
```
29
+
24
30
2. In your template, use the code `$ModulePosition(alias)` where alias is your position's alias string.
$fields->addFieldToTab('Root.ModulePositions', LiteralField::create('html','<em>To load a position into your template, simply write <code>$ModulePosition(Alias)</code> where <code>Alias</code> is your position alias</em>'));
46
+
47
+
// module positions tab
48
+
$positionsHtml = '<h2>Module positions</h2>';
49
+
$positionsHtml .= '<p class="message info">To change these you need to edit the positions specified in the <code>_config.php</code> file. These are your currently configured positions available:</p>';
$positionsHtml .= '<p>• <strong>'.$position.'</strong><br /> Use in your template with <code>$ModulePosition("'.$position.'");</code></p>';
0 commit comments