Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Small text changes, added api links, cont. updating images for tutori…

…als, fixed tutorials from member feedback
  • Loading branch information...
commit f3ac57394d3e1f7e6003d5b32d409ddba68900b8 1 parent e9f20cf
Michael Andrewartha authored chillu committed
Showing with 718 additions and 643 deletions.
  1. +1 −1  docs/en/reference/advanced-templates.md
  2. +1 −1  docs/en/reference/bbcode.md
  3. +1 −1  docs/en/reference/built-in-page-controls.md
  4. +10 −10 docs/en/reference/complextablefield.md
  5. +12 −12 docs/en/reference/database-structure.md
  6. +5 −7 docs/en/reference/dataobject.md
  7. +13 −13 docs/en/reference/dataobjectdecorator.md
  8. +3 −3 docs/en/reference/dataobjectset.md
  9. +5 −5 docs/en/reference/director.md
  10. +2 −2 docs/en/reference/execution-pipeline.md
  11. +1 −1  docs/en/reference/form-field-types.md
  12. +2 −2 docs/en/reference/image.md
  13. +1 −1  docs/en/reference/index.md
  14. +12 −11 docs/en/reference/member.md
  15. +1 −1  docs/en/reference/modeladmin.md
  16. +2 −4 docs/en/reference/partial-caching.md
  17. +3 −3 docs/en/reference/permission.md
  18. +1 −2  docs/en/reference/requirements.md
  19. +8 −7 docs/en/reference/restfulservice.md
  20. +4 −4 docs/en/reference/rssfeed.md
  21. +7 −11 docs/en/reference/searchcontext.md
  22. +5 −7 docs/en/reference/site-reports.md
  23. +7 −8 docs/en/reference/siteconfig.md
  24. +9 −9 docs/en/reference/sqlquery.md
  25. +4 −4 docs/en/reference/staticpublisher.md
  26. +8 −9 docs/en/reference/tablefield.md
  27. +12 −12 docs/en/reference/tablelistfield.md
  28. +6 −8 docs/en/reference/typography.md
  29. +9 −9 docs/en/reference/urlvariabletools.md
  30. +1 −3 docs/en/reference/versioned.md
  31. +16 −12 docs/en/topics/access-control.md
  32. +7 −6 docs/en/topics/configuration.md
  33. +14 −14 docs/en/topics/controller.md
  34. +3 −2 docs/en/topics/css.md
  35. +3 −3 docs/en/topics/data-types.md
  36. +33 −35 docs/en/topics/datamodel.md
  37. +4 −4 docs/en/topics/debugging.md
  38. +3 −3 docs/en/topics/directory-structure.md
  39. +8 −8 docs/en/topics/email.md
  40. +14 −14 docs/en/topics/environment-management.md
  41. +6 −5 docs/en/topics/error-handling.md
  42. +5 −7 docs/en/topics/extending-the-cms.md
  43. +2 −2 docs/en/topics/form-validation.md
  44. +7 −4 docs/en/topics/forms.md
  45. +10 −6 docs/en/topics/i18n.md
  46. +3 −3 docs/en/topics/index.md
  47. +8 −6 docs/en/topics/javascript.md
  48. +6 −3 docs/en/topics/module-development.md
  49. +5 −0 docs/en/topics/modules.md
  50. +7 −6 docs/en/topics/page-types.md
  51. +6 −3 docs/en/topics/search.md
  52. +12 −11 docs/en/topics/security.md
  53. +2 −2 docs/en/topics/templates.md
  54. +3 −5 docs/en/topics/testing/create-functional-test.md
  55. +5 −5 docs/en/topics/testing/create-sapphire-test.md
  56. +3 −3 docs/en/topics/testing/email-sending.md
  57. +13 −10 docs/en/topics/theme-development.md
  58. +1 −1  docs/en/topics/themes.md
  59. +48 −36 docs/en/topics/translation.md
  60. +41 −33 docs/en/topics/widgets.md
  61. +2 −2 docs/en/tutorials/2-extending-a-basic-site.md
  62. +64 −1 docs/en/tutorials/4-site-search.md
  63. +198 −217 docs/en/tutorials/5-dataobject-relationship-management.md
  64. BIN  docs/en/tutorials/_images/gsoc-mentor-creation.jpg
  65. BIN  docs/en/tutorials/_images/gsoc-mentor-student-selection.jpg
  66. BIN  docs/en/tutorials/_images/gsoc-mentor.jpg
  67. BIN  docs/en/tutorials/_images/gsoc-module-creation.jpg
  68. BIN  docs/en/tutorials/_images/gsoc-project-creation.jpg
  69. BIN  docs/en/tutorials/_images/gsoc-project-module-selection.jpg
  70. BIN  docs/en/tutorials/_images/gsoc-project-student-selection.jpg
  71. BIN  docs/en/tutorials/_images/gsoc-project.jpg
  72. BIN  docs/en/tutorials/_images/gsoc-projects-table.jpg
  73. BIN  docs/en/tutorials/_images/gsoc-student-creation.jpg
  74. BIN  docs/en/tutorials/_images/searchform-small.jpg
  75. BIN  docs/en/tutorials/_images/searchform.jpg
  76. BIN  docs/en/tutorials/_images/searchresults-small.jpg
  77. BIN  docs/en/tutorials/_images/searchresults.jpg
  78. BIN  docs/en/tutorials/_images/tutorial5-completecode-blackcandy.zip
  79. BIN  docs/en/tutorials/_images/tutorial5-completecode.zip
View
2  docs/en/reference/advanced-templates.md
@@ -406,7 +406,7 @@ to debug.
## Related
* [Templates](/topics/templates)
* [Themes](/topics/themes)
-* [Developing Themes](theme-development)
+* [Developing Themes](/topics/theme-development)
* [Widgets](/topics/widgets)
* [Images](/reference/image)
* [Built in page controls](/reference/built-in-page-controls)
View
2  docs/en/reference/bbcode.md
@@ -9,7 +9,7 @@ BBCode is used by default in the [blog](http://silverstripe.org/blog-module) and
To add bbcode parsing to a template, instead of $Content use:
- :::php
+ :::ss
$Content.Parse(BBCodeParser)
View
2  docs/en/reference/built-in-page-controls.md
@@ -60,7 +60,7 @@ SilverStripe supports a simple set of conditional logic
<% end_if %>
-See more information on conditional logic on [templates](templates).
+See more information on conditional logic on [templates](/topics/templates).
### Site wide settings
View
20 docs/en/reference/complextablefield.md
@@ -15,7 +15,7 @@ See `[api:TableListField]`.
## Setting Parent/Child-Relations
-ComplexTableField tries to determine the parent-relation automatically by looking at the $has_one property on the listed
+`[api:ComplexTableField]` tries to determine the parent-relation automatically by looking at the $has_one property on the listed
child, or the record loaded into the surrounding form (see getParentClass() and getParentIdName()). You can force a
specific parent relation:
@@ -62,18 +62,18 @@ You can override this behaviour in various ways:
If you don't want several functions to appear (e.g. no add-link), there's several ways:
-* Use ComplexTableField->setPermissions(array("show","edit")) to limit the functionality without touching the template
+* Use `ComplexTableField->setPermissions(array("show","edit"))` to limit the functionality without touching the template
(more secure). Possible values are "show","edit", "delete" and "add".
-* Subclass ComplexTableField and override the rendering-mechanism
-* Use ComplexTableField->setTemplate() and ComplexTableField->setTemplatePopup() to provide custom templates
+* Subclass `[api:ComplexTableField]` and override the rendering-mechanism
+* Use `ComplexTableField->setTemplate()` and `ComplexTableField->setTemplatePopup()` to provide custom templates
### Customising fields and Requirements in the popup
There are several ways to customise the fields in the popup. Often you would want to display more information in the
popup as there is more real-estate for you to play with.
-ComplexTableField gives you several options to do this. You can either
+`[api:ComplexTableField]` gives you several options to do this. You can either
* Pass a FieldSet in the constructor.
* Pass a String in the constructor.
@@ -83,7 +83,7 @@ The second will call the String as a method on the source class (Which should re
Popup.
You can also customise Javascript which is loaded for the Lightbox. As Requirements::clear() is called when the popup is
-instantiated, ComplexTableField will look for a function to gather any specific requirements that you might need on your
+instantiated, `[api:ComplexTableField]` will look for a function to gather any specific requirements that you might need on your
source class. (e.g. Inline Javascript or styling).
For this, create a function called "getRequirementsForPopup".
@@ -116,11 +116,11 @@ You'll have to do something like this in your form:
You have to hack in an ID on the form, as the CMS forms have this, and front end forms usually do not.
-It's not a perfect solution, but it works relatively well to get a simple ComplexTableField up and running on the front
+It's not a perfect solution, but it works relatively well to get a simple `[api:ComplexTableField]` up and running on the front
end.
To come: Make it a lot more flexible so tables can be easily used on the front end. It also needs to be flexible enough
-to use a popup as well, out of the box.
+to use a popup as well, out of the box.
## Subclassing
@@ -144,7 +144,7 @@ Most of the time, you need to override the following methods:
* Find a less fragile solution for accessing this field through the main controller and ReferencedField, e.g. build a
seperate CTF-instance (doesn't necessarly have to be connected to the original by ReferencedField)
* Control width/height of popup by constructor (hardcoded at the moment)
-* Integrate search from MemberTableField.php directly on ComplexTableField
+* Integrate search from MemberTableField.php directly on `[api:ComplexTableField]`
* Less performance-hungry implementation of detail-view paging (don't return all items on a single view)
* Use automatic has-many and many-many functions to return a ComponentSet rather than building the join manually
-* Javascript/Ajax-Sorting (see http://www.activewidgets.com/grid/ and http://openrico.org/rico/livegrid.page)
+* Javascript/Ajax-Sorting (see [http://www.activewidgets.com/grid/](http://www.activewidgets.com/grid/) and [http://openrico.org/rico/livegrid.page](http://openrico.org/rico/livegrid.page))
View
24 docs/en/reference/database-structure.md
@@ -5,7 +5,7 @@ opting for "convention over configuration". This page details what that databas
## Base tables
-Each direct sub-class of DataObject will have its own table.
+Each direct sub-class of `[api:DataObject]` will have its own table.
The following fields are always created.
@@ -36,21 +36,21 @@ data sub-classed objects across **multiple tables**.
For example, suppose we have the following set of classes:
-* Class SiteTree extends DataObject: Title, Content fields
-* Class Page extends SiteTree: Abstract field
-* Class NewsSection extends SiteTree: *No special fields*
-* Class NewsArticle extend Page: ArticleDate field
+* Class `[api:SiteTree]` extends `[api:DataObject]`: Title, Content fields
+* Class `[api:Page]` extends `[api:SiteTree]`: Abstract field
+* Class NewsSection extends `[api:SiteTree]`: *No special fields*
+* Class NewsArticle extend `[api:Page]`: ArticleDate field
The data for the following classes would be stored across the following tables:
-* SiteTree
+* `[api:SiteTree]`
* ID: Int
* ClassName: Enum('SiteTree', 'Page', 'NewsArticle')
* Created: Datetime
* LastEdited: Datetime
* Title: Varchar
* Content: Text
-* Page
+* `[api:Page]`
* ID: Int
* Abstract: Text
* NewsArticle
@@ -59,16 +59,16 @@ The data for the following classes would be stored across the following tables:
The way it works is this:
-* "Base classes" are direct sub-classes of DataObject. They are always given a table, whether or not they have special
-fields. This is called the "base table"
+* "Base classes" are direct sub-classes of `[api:DataObject]`. They are always given a table, whether or not they have
+special fields. This is called the "base table"
* The base table's ClassName field is set to class of the given record. It's an enumeration of all possible
sub-classes of the base class (including the base class itself)
* Each sub-class of the base object will also be given its own table, *as long as it has custom fields*. In the
example above, NewsSection didn't have its own data and so an extra table would be redundant.
* In all the tables, ID is the primary key. A matching ID number is used for all parts of a particular record:
-record #2 in Page refers to the same object as record #2 in SiteTree.
+record #2 in Page refers to the same object as record #2 in `[api:SiteTree]`.
-To retrieve a news article, SilverStripe joins the SiteTree, Page and NewsArticle tables by their ID fields. We use a
+To retrieve a news article, SilverStripe joins the `[api:SiteTree]`, `[api:Page]` and NewsArticle tables by their ID fields. We use a
left-join for robustness; if there is no matching record in Page, we can return a record with a blank Article field.
## Staging and versioning
@@ -126,4 +126,4 @@ other database platforms if we chose to support them.
* We'd like to support more than just MySQL, however, there needs to be a pretty good reason for doing so since it will
become something that needs to be supported for the rest of SilverStripe's life and could easily become an albatross.
On the cards are MS SQL, PostgreSQL and SQLite.
-* It could be desireable to implement a non-repeating auto-numbering system.
+* It could be desirable to implement a non-repeating auto-numbering system.
View
12 docs/en/reference/dataobject.md
@@ -12,7 +12,7 @@ A single database record & abstract class for the data-access-model.
## Basics
-The call to `DataObject->getCMSFields()` is the centerpiece of every data administration interface in Silverstripe,
+The call to `DataObject->getCMSFields()` is the centerpiece of every data administration interface in SilverStripe,
which returns a `[api:FieldSet]`''.
:::php
@@ -33,8 +33,6 @@ These calls retrieve a `[api:FieldSet]` for the area where you intend to work wi
* Requirements: SilverStripe 2.3.*
-// bla
-
:::php
$fields = singleton('MyDataObject')->getCMSFields();
@@ -82,8 +80,8 @@ Example: Simple Definition
}
-Searchable fields will be appear in the search interface with a default form field (usually a TextField) and a default
-search filter assigned (usually an ExactMatchFilter). To override these defaults, you can specify additional information
+Searchable fields will be appear in the search interface with a default form field (usually a `[api:TextField]`) and a default
+search filter assigned (usually an `[api:ExactMatchFilter]`). To override these defaults, you can specify additional information
on `$searchable_fields`:
:::php
@@ -95,7 +93,7 @@ on `$searchable_fields`:
}
-If you assign a single string value, you can set it to be either a FormField or SearchFilter. To specify both, you can
+If you assign a single string value, you can set it to be either a `[api:FormField]` or `[api:SearchFilter]`. To specify both, you can
assign an array:
:::php
@@ -144,7 +142,7 @@ To include relations (''$has_one'', `$has_many` and `$many_many`) in your search
* Requirements: SilverStripe 2.3.*
-Summary fields can be used to show a quick overview of the data for a specific DataObject record. Most common use is
+Summary fields can be used to show a quick overview of the data for a specific `[api:DataObject]` record. Most common use is
their display as table columns, e.g. in the search results of a `[api:ModelAdmin]` CMS interface.
Example: Getting predefined summary fields
View
26 docs/en/reference/dataobjectdecorator.md
@@ -9,7 +9,7 @@ implementation. Have a look at `[api:Object->useCustomClass()]`.
## Usage
-Your Decorator will nee to be a subclass of DataObjectDecorator or the Extension class.
+Your Decorator will nee to be a subclass of `[api:DataObjectDecorator]` or the `[api:Extension]` class.
:::php
<?php
@@ -27,7 +27,7 @@ class you want to extend.
### Adding a decorator to a built-in class
Sometimes you will want to add decorators to classes that you didn't make. For example, you might want to add the
-ForumRole decorator to the Member object.
+`[api:ForumRole]` decorator to the `[api:Member]` object.
:::php
@@ -97,20 +97,20 @@ The $fields parameter is passed by reference, as it is an object.
### Custom database generation
-Some decorators are designed to transparently add more sophisticated data-collection capabilities to your data object.
-For example, Versioned adds version tracking and staging to any data object that it is applied to. To do this, you need
-to be able to create additional database tables and fields to keep your state stored in.
+Some decorators are designed to transparently add more sophisticated data-collection capabilities to your data object.
+For example, `[api:Versioned]` adds version tracking and staging to any data object that it is applied to. To do this,
+you need to be able to create additional database tables and fields to keep your state stored in.
To do this, define an **augmentDatabase()** method on your decorator. This will be called when db/build is visited.
-* You can query $this->owner for information about the data object, such as the fields it has
+* You can query ``$this->owner`` for information about the data object, such as the fields it has
* You can use **DB::requireTable($tableName, $fieldList, $indexList)** to set up your new tables. This function takes
care of creating, modifying, or leaving tables as required, based on your desired schema.
### Custom write queries
If you have customised the generated database, then you probably want to change the way that writes happen. This is
-used by Versioned to get an entry written in ClassName_versions whenever an insert/update happens.
+used by `[api:Versioned]` to get an entry written in ClassName_versions whenever an insert/update happens.
To do this, define the **augmentWrite(&$manipulation)** method. This method is passed a manipulation array representing
the write about to happen, and is able to amend this as desired, since it is passed by reference.
@@ -125,17 +125,17 @@ be modified as needed by your method. Instead of a manipulation array, we have
### Additional methods
-The other thing you may want to do with a decorator is provide a method that can be called on the DataObject that is
-being decorated. For instance, you may add a publish() method to every DataObject that is decorated with Versioned.
+The other thing you may want to do with a decorator is provide a method that can be called on the `[api:DataObject]` that is
+being decorated. For instance, you may add a publish() method to every `[api:DataObject]` that is decorated with `[api:Versioned]`.
This is as simple as defining a method called publish() on your decorator. Bear in mind, however, that instead of
$this, you should be referring to $this->owner.
-* $this = The DataObjectDecorator object.
-* $this->owner = The related DataObject object.
+* $this = The `[api:DataObjectDecorator]` object.
+* $this->owner = The related `[api:DataObject]` object.
-If you want to add your own internal properties, you can add this to the DataObjectDecorator, and these will be referred
-to as $this->propertyName. Every DataObject has an associated DataObjectDecorator instance for each class that it is
+If you want to add your own internal properties, you can add this to the `[api:DataObjectDecorator]`, and these will be referred
+to as `$this->propertyName`. Every `[api:DataObject]` has an associated `[api:DataObjectDecorator]` instance for each class that it is
decorated by.
:::php
View
6 docs/en/reference/dataobjectset.md
@@ -6,7 +6,7 @@ This class represents a set of `[api:DataObject]`s, such as the results of a que
[datamodel](/topics/datamodel)-related querying. It implements the [Iterator
interface](http://php.net/manual/en/language.oop5.iterations.php) introduced in PHP5.
-Relations (`has_many`/`many_many`) are described in `[api:ComponentSet]`, a subclass of DataObjectSet.
+Relations (`has_many`/`many_many`) are described in `[api:ComponentSet]`, a subclass of `[api:DataObjectSet]`.
## Usage
@@ -56,7 +56,7 @@ This works on the object itself, so do NOT do something like this:
:::php
$sortedSet = $mySet->sort('Lastname'); //ascending
-## Merge with other DataObjectSets
+## Merge with other `[api:DataObjectSet]`s
:::php
$myFirstSet->merge($mySecondSet);
@@ -88,7 +88,7 @@ It is good practice to check for empty sets before doing any iteration.
### Paging
-DataObjects have native support for dealing with **pagination**.
+`[api:DataObject]`s have native support for dealing with **pagination**.
See *setPageLimits*, *setPageLength*, etc.
FIXME Complete pagination documentation
View
10 docs/en/reference/director.md
@@ -2,7 +2,7 @@
## Introduction
-Director is the first step in the "execution pipeline". It parses the URL, matching it to one of a number of patterns,
+`[api:Director]` is the first step in the "execution pipeline". It parses the URL, matching it to one of a number of patterns,
and determines the controller, action and any argument to be used. It then runs the controller, which will finally run
the viewer and/or perform processing steps.
@@ -12,7 +12,7 @@ the viewer and/or perform processing steps.
## Redirection
-The Director class has a number of methods to facilitate 301 and 302 HTTP redirection.
+The `[api:Director]` class has a number of methods to facilitate 301 and 302 HTTP redirection.
* **Director::redirect("action-name")**: If there's no slash in the URL passed to redirect, then it is assumed that you
want to go to a different action on the current controller.
@@ -33,8 +33,8 @@ redirectBack().
You can influence the way URLs are resolved one of 2 ways
-1. Adding rules to Director in `<yourproject>/_config.php` (See Default Rewrite Rules below for examples)
-2. Adding rules in your extended Controller class via the *$url_handlers* static variable
+1. Adding rules to `[api:Director]` in `<yourproject>/_config.php` (See Default Rewrite Rules below for examples)
+2. Adding rules in your extended `[api:Controller]` class via the *$url_handlers* static variable
See [controller](/topics/controller) for examples and explanations on how the rules get processed for both 1 and 2 above.
@@ -56,7 +56,7 @@ SilverStripe comes with certain rewrite rules (e.g. for *admin/assets*).
## Links
-* See ModelAsController class for details on controller/model-coupling
+* See `[api:ModelAsController]` class for details on controller/model-coupling
* See [execution-pipeline](/reference/execution-pipeline) for custom routing
## API Documentation
View
4 docs/en/reference/execution-pipeline.md
@@ -53,7 +53,7 @@ All requests go through main.php, which sets up the environment and then hands c
**See:** The API documentation of `[api:Main]` for information about how main.php processes requests.
## Director and URL patterns
-main.php relies on Director to work out which controller should handle this request. Director will instantiate that
+main.php relies on `[api:Director]` to work out which controller should handle this request. `[api:Director]` will instantiate that
controller object and then call `[api:Controller::run()]`.
**See:** The API documentation of `[api:Director]` for information about how Director parses URLs and hands control over to a controller object.
@@ -73,7 +73,7 @@ When you create a function, you can access the ID like this:
## Controllers and actions
-Controllers are the building blocks of your application.
+`[api:Controller]`s are the building blocks of your application.
**See:** The API documentation for `[api:Controller]`
View
2  docs/en/reference/form-field-types.md
@@ -48,7 +48,7 @@ set {inlcudeDefaultJS} to false and work with behaviour.js.
* `[FileField](api:FileField)`: Simple file upload dialog.
* `[FileIFrameField](api:FileIFrameField)`: File uploads through an iframe
-* `[api:Image]`: Image upload through an iframe, with thumbnails and file-selection from existing assets
+* `[api:ImageField]`: Image upload through an iframe, with thumbnails and file-selection from existing assets
* `[SimpleImageField](api:SimpleImageField)`: SimpleImageField provides an easy way of uploading images to Image has_one
relationships. Unlike ImageField, it doesn't use an iframe.
View
4 docs/en/reference/image.md
@@ -111,8 +111,8 @@ and whenever you upload or modify an Image through SilverStripe.
If you encounter problems with images not appearing, or have mysteriously disappeared, you can try manually flushing the
image cache.
-
+
http://www.mysite.com/images/flush
-
+
## API Documentation
`[api:Image]`
View
2  docs/en/reference/index.md
@@ -2,6 +2,7 @@
Reference articles complement our auto-generated [API docs](http://api.silverstripe.org) in providing deeper introduction into a specific API.
+* [Advanced templates](advanced-templates): Advanced SilverStripe template syntax
* [BBCode](bbcode): Extensible shortcode syntax
* [Built-in page controls](built-in-page-controls): Explains the template syntax and available variables/placeholders
* [ComplexTableField](complextablefield): Manage records and their relations inside the CMS
@@ -29,7 +30,6 @@ Reference articles complement our auto-generated [API docs](http://api.silverstr
* [StaticPublisher](staticpublisher): Export a page tree as static HTML for better performance and portability
* [TableField](tablefield): Add and edit records with inline edits in this form field
* [TableListField](tablelistfield): View and delete records in the CMS
-* [Templates](templates): Process our data for output in HTML and other formats
* [Typography](typography): CSS file to enable WYSIWYG previews in the CMS
* [urlvariabletools](urlvariabletools): Debug and maintenance switches
* [Versioned](versioned): Extension for SiteTree and other classes to store old versions and provide "staging"
View
23 docs/en/reference/member.md
@@ -2,11 +2,11 @@
## Introduction
-The Member class is used to represent user accounts on a SilverStripe site (including newsletter recipients).
+The `[api:Member]` class is used to represent user accounts on a SilverStripe site (including newsletter recipients).
## Testing For Logged In Users
-The Member class comes with 2 static methods for getting information about the current logged in user.
+The `[api:Member]` class comes with 2 static methods for getting information about the current logged in user.
**Member::currentUserID()**
@@ -38,10 +38,11 @@ Returns the full *Member* Object for the current user, returns *null* if user is
## Subclassing
<div class="warning" markdown="1">
-This is the least desirable way of extending the Member class. It's better to use DataObjectDecorator (see below).
+This is the least desirable way of extending the `[api:Member]` class. It's better to use `[api:DataObjectDecorator]`
+(see below).
</div>
-You can defined subclasses of member to add extra fields or functionality to the built-in membership system.
+You can defined subclasses of `[api:Member]` to add extra fields or functionality to the built-in membership system.
:::php
class MyMember extends Member {
@@ -63,8 +64,8 @@ Note that if you want to look this class-name up, you can call Object::getCustom
## Overloading getCMSFields()
If you overload the built-in function getCMSFields(), then you can change the form that is used to view & edit member
-details in the newsletter system. This function returns a FieldSet object. You should generally start by calling
-parent::getCMSFields() and manipulate the FieldSet from there.
+details in the newsletter system. This function returns a `[api:FieldSet]` object. You should generally start by calling
+parent::getCMSFields() and manipulate the `[api:FieldSet]` from there.
:::php
function getCMSFields() {
@@ -78,11 +79,11 @@ parent::getCMSFields() and manipulate the FieldSet from there.
## Extending Member or DataObject?
-Basic rule: Class "Member" should just be extended for entities who have some kind of login.
-If you have different types of Members in the system, you have to make sure that those with login-capabilities have
+Basic rule: Class `[api:Member]` should just be extended for entities who have some kind of login.
+If you have different types of `[api:Member]`s in the system, you have to make sure that those with login-capabilities have
unique email-addresses (as this is used for login-credentials).
-For persons without login-capabilities (e.g. for an address-database), you shouldn't extend member to avoid conflicts
-with the Member-database. This enables us to have a different subclass of Member for an email-address with login-data,
+For persons without login-capabilities (e.g. for an address-database), you shouldn't extend `[api:Member]` to avoid conflicts
+with the Member-database. This enables us to have a different subclass of `[api:Member]` for an email-address with login-data,
and another subclass for the same email-address in the address-database.
## Member Role Decorator
@@ -95,7 +96,7 @@ class. A better way is to use role decorators to add this behaviour.
// OR
Member::add_role('ForumRole');
-A role decorator is simply a subclass of `[api:DataObjectDecorator]` that is designed to be used to add behaviour to Member.
+A role decorator is simply a subclass of `[api:DataObjectDecorator]` that is designed to be used to add behaviour to `[api:Member]`.
The roles affect the entire class - all members will get the additional behaviour. However, if you want to restrict
things, you should add appropriate `[api:Permission::checkMember()]` calls to the role's methods.
View
2  docs/en/reference/modeladmin.md
@@ -104,7 +104,7 @@ fields are searched (e.g. "partial match", "fulltext", etc.) using `$searchable_
## Summary Fields
Summary Fields are the columns which are shown in the `[api:TableListField]` when viewing DataObjects. These can be
-customized for each DataObject's search results using `$summary_fields`.
+customized for each `[api:DataObject]`'s search results using `$summary_fields`.
* See `[api:DataObject]`
View
6 docs/en/reference/partial-caching.md
@@ -55,7 +55,7 @@ From a block that shows a summary of the page edits if administrator, nothing if
Often you want to invalidate a cache when any in a set of objects change, or when the objects in a relationship change.
To help do this, SilverStripe 2.4 also introduces the concept of Aggregates. These calculate and return SQL aggregates
-on sets of DataObjects - the most useful for us being the Max aggregate.
+on sets of `[api:DataObject]`s - the most useful for us being the Max aggregate.
For example, if we have a menu, we want that menu to update whenever _any_ page is edited, but would like to cache it
otherwise. By using aggregates, that's easy
@@ -236,6 +236,4 @@ Can be re-written as:
<% end_control %>
<% end_cached %>
- <% end_cached %>
-
-
+ <% end_cached %>
View
6 docs/en/reference/permission.md
@@ -12,7 +12,7 @@ and then select the permissions tab, and add that permission to the list.
The simple usage, Permission::check("PERM_CODE") will detect if the currently logged in member has the given permission.
See the API docs for more options.
-** Group ACLs **
+**Group ACLs**
* Call **Permission::check("MY_PERMISSION_CODE")** to see if the current user has MY_PERMISSION_CODE.
* MY_PERMISSION_CODE can be loaded into the Security admin on the appropriate group, using the "Permissions" tab.
@@ -22,9 +22,9 @@ You can use whatever codes you like, but for the sanity of developers and users,
## PermissionProvider
-PermissionProvider is an interface which lets you define a method *providePermissions()*. This method should return a
+`[api:PermissionProvider]` is an interface which lets you define a method *providePermissions()*. This method should return a
map of permission code names with a human readable explanation of its purpose (see
-[:permission:codes](/reference/permission)).
+[permissions:codes](/reference/permission)).
:::php
class Page_Controller implements PermissionProvider {
View
3  docs/en/reference/requirements.md
@@ -133,8 +133,7 @@ In your controller's init() function, add:
## CMS Requirements
-The Silverstripe core includes a lot of Requirements by itself. Most of these are collated in `[api:LeftAndMain]`//
-first.
+The SilverStripe core includes a lot of Requirements by itself. Most of these are collated in `[api:LeftAndMain]` first.
## Motivation
View
15 docs/en/reference/restfulservice.md
@@ -2,12 +2,13 @@
## Introduction
-RestfulService enables connecting to remote web services which supports REST interface and consume those web services
-(for example Flickr, Youtube, Amazon and etc). RestfulService can parse the XML response (sorry no JSON support)
+`[api:RestfulService]` enables connecting to remote web services which supports REST interface and consume those web services
+(for example [Flickr](http://www.flickr.com/services/api/), [Youtube](http://code.google.com/apis/youtube/overview.html), Amazon and etc). `[api:RestfulService]` can parse the XML response (sorry no JSON support)
returned from the web service. Further it supports caching of the response, and you can customize the cache interval.
-To gain the functionality you can either create a new RestfulService object or create a class extending the
-RestfulService (see `flickrservice` and `youtubeservice` modules).
+To gain the functionality you can either create a new `[api:RestfulService]` object or create a class extending the
+RestfulService (see [flickrservice](http://silverstripe.org/flickr-module/) and
+[youtubeservice](http://silverstripe.org/youtube-gallery-module/) modules).
## Examples
@@ -112,8 +113,8 @@ to get the value of entry node with the namespace media, use:
### Handling Errors
-If the web service returned an error (for example, API key not available or inadequate parameters) RestfulService could
-delgate the error handling to it's descendant class. To handle the errors define a function called errorCatch
+If the web service returned an error (for example, API key not available or inadequate parameters) `[api:RestfulService]`
+could delgate the error handling to it's descendant class. To handle the errors define a function called errorCatch
:::php
/*
@@ -142,7 +143,7 @@ If you want to bypass error handling on your sub-classes you could define that i
## Other Uses
-### How to use RestfulService to easily embed an RSS feed
+### How to use `[api:RestfulService]` to easily embed an RSS feed
`[api:RestfulService]` can be used to easily embed an RSS feed (since it's also an xml response) from a site
such as del.icio.us
View
8 docs/en/reference/rssfeed.md
@@ -5,7 +5,7 @@
Generating RSS/Atom-feeds is just a matter of rendering a `[api:DataObject]` and the Page Comment Interface.
Handled through the `[api:RSSFeed]` class.
-RSSFeed doesn't limit you to generating "article-based" feeds, it is just as easy to create a feed of your current
+`[api:RSSFeed]` doesn't limit you to generating "article-based" feeds, it is just as easy to create a feed of your current
staff-members. The only logical limitation here is that every item in the RSS-feed should be accessible through a URL on
your website, so its advisable to just create feeds from subclasses of `[api:SiteTree]`.
@@ -31,7 +31,7 @@ your website, so its advisable to just create feeds from subclasses of `[api:Sit
### Example of showing the 10 most recently updated pages
-You can use RSSFeed to easily create a feed showing your latest Page updates. Just change mysite/code/Page.php to
+You can use `[api:RSSFeed]` to easily create a feed showing your latest Page updates. Just change mysite/code/Page.php to
something like this:
:::php
@@ -44,7 +44,7 @@ something like this:
}
class Page_Controller extends ContentController {
-
+
function init() {
RSSFeed::linkToFeed($this->Link() . "rss", "10 Most Recently Updated Pages");
parent::init();
@@ -72,7 +72,7 @@ can also do http://www.yoursite.com/PageComment/rss?pageid=46 where pageid is th
## External Sources
-RSSFeed only creates feeds from your own data. We've included the [SimplePie](http://simplepie.org) RSS-parser for
+`[api:RSSFeed]` only creates feeds from your own data. We've included the [SimplePie](http://simplepie.org) RSS-parser for
accessing feeds from external sources.
View
18 docs/en/reference/searchcontext.md
@@ -3,16 +3,16 @@
## Introduction
Manages searching of properties on one or more `[api:DataObject]` types, based on a given set of input parameters.
-SearchContext is intentionally decoupled from any controller-logic,
+`[api:SearchContext]` is intentionally decoupled from any controller-logic,
it just receives a set of search parameters and an object class it acts on.
-The default output of a SearchContext is either a `[api:SQLQuery]` object for further refinement, or a
+The default output of a `[api:SearchContext]` is either a `[api:SQLQuery]` object for further refinement, or a
`[api:DataObject]` instance.
In case you need multiple contexts, consider namespacing your request parameters by using `FieldSet->namespace()` on
the $fields constructor parameter.
-SearchContext is mainly used by `[api:ModelAdmin]`, our generic data administration interface. Another
+`[api:SearchContext]` is mainly used by `[api:ModelAdmin]`, our generic data administration interface. Another
implementation can be found in generic frontend search forms through the [genericviews](http://silverstripe.org/generic-views-module) module.
## Requirements
@@ -33,9 +33,10 @@ See `[api:DataObject::$searchable_fields]`.
### Customizing fields and filters
-In this example we're defining three attributes on our MyDataObject subclasss: `PublicProperty`, `HiddenProperty`
+In this example we're defining three attributes on our MyDataObject subclass: `PublicProperty`, `HiddenProperty`
and `MyDate`. The attribute `HiddenProperty` should not be searchable, and `MyDate` should only search for dates
-*after* the search entry (with a `GreaterThanFilter`). Similiar to the built-in `DataObject->getDefaultSearchContext()` method, we're building our own `getCustomSearchContext()` variant.
+*after* the search entry (with a `GreaterThanFilter`). Similiar to the built-in `DataObject->getDefaultSearchContext()`
+method, we're building our own `getCustomSearchContext()` variant.
:::php
class MyDataObject extends DataObject {
@@ -86,11 +87,6 @@ and `MyDate`. The attribute `HiddenProperty` should not be searchable, and `MyDa
}
-
-
-
-
-
### Pagination
For paginating records on multiple pages, you need to get the generated `SQLQuery` before firing off the actual
@@ -184,7 +180,7 @@ Results.PaginationSummary(4) defines how many pages the search will show in the
## Available SearchFilters
-See SearchFilter API Documentation `[api:SearchFilter]`
+See `[api:SearchFilter]` API Documentation
## API Documentation
`[api:SearchContext]`
View
12 docs/en/reference/site-reports.md
@@ -6,23 +6,23 @@ the site reports by clicking "Site Reports" in the left hand side bar and select
![](_images/sitereport.png)
-By default the CMS ships with a couple basic reports -
+By default the CMS ships with a couple of basic reports -
## Default Reports
* "Empty Pages" which will generate a list of pages without content
* "Pages edited in the last 2 weeks" which will list all the pages edited in the last 2 weeks in order of most recently
edited.
-* "To Do" which displays all the ToDo notes you have added to each page and a link to the page. This is in 2.2.2 and
+* "To Do" which displays all the ToDo notes you have added to each page and a link to the page. Note: This is in 2.2.2 and
later
* Also the Ecommerce module provides 2 or 3 reports out of box. Such as All Products, Orders...
## Creating Custom Reports
-You can create reports for you own data quickly and easily. A general knowledge of Silverstripe's
+You can create reports for you own data quickly and easily. A general knowledge of SilverStripe's
[Datamodel](/topics/datamodel) would help before you attempt this.
-Inside the Mysite/Code folder - your projects code, create a file called CustomSideReport or MyProjectSiteReport and
+Inside the Mysite/Code folder - your projects code, create a file called `CustomSideReport` or `MyProjectSiteReport` and
inside this file we can add our site reports.
CustomSideReport.php
@@ -91,6 +91,4 @@ file and add class's as you need them inside that for each report.
* More examples.
## API Documentation
-`[api:ReportAdmin]`
-
-
+`[api:ReportAdmin]`
View
15 docs/en/reference/siteconfig.md
@@ -2,12 +2,12 @@
## Introduction
-The SiteConfig panel was introduced in 2.4 for providing a generic interface for managing site wide settings or
+The `[api:SiteConfig]` panel was introduced in 2.4 for providing a generic interface for managing site wide settings or
functionality which is used throughout the site. Out of the box it provides 2 fields 'Site Name' and 'Site Tagline'.
-## Accessing SiteConfig Options
+## Accessing `[api:SiteConfig]` Options
-You can access SiteConfig options from any SS template by using the function $SiteConfig.FieldName
+You can access `[api:SiteConfig]` options from any SS template by using the function $SiteConfig.FieldName
:::ss
$SiteConfig.Title
@@ -28,8 +28,7 @@ Or if you want to access variables in the PHP you can do
$config->Title
-
-## Extending SiteConfig
+## Extending `[api:SiteConfig]`
To extend the options available in the panel you can define your own fields via an Extension.
@@ -59,13 +58,13 @@ Then add a link to your extension in the _config.php file like below.
Object::add_extension('SiteConfig', 'CustomSiteConfig');
-This tells SilverStripe to add the CustomSiteConfig extension to the SiteConfig class.
+This tells SilverStripe to add the CustomSiteConfig extension to the `[api:SiteConfig]` class.
After adding those two pieces of code, rebuild your database by visiting http://yoursite.com/dev/build and then reload
the admin interface. You may need to reload it with a ?flush=1 on the end.
-You can define as many extensions for SiteConfig as you need. For example if you are developing a module you can define
+You can define as many extensions for `[api:SiteConfig]` as you need. For example if you are developing a module you can define
your own global settings for the dashboard.
## API Documentation
-`[api:SiteConfig]`
+`[api:SiteConfig]`
View
18 docs/en/reference/sqlquery.md
@@ -5,7 +5,7 @@
An object representing a SQL query. It is easier to deal with object-wrappers than string-parsing a raw SQL-query. This
object is used by `[api:DataObject]`, though...
-A word of caution: Dealing with low-level SQL is not encouraged in the Silverstripe [datamodel](/topics/datamodel) for various
+A word of caution: Dealing with low-level SQL is not encouraged in the SilverStripe [datamodel](/topics/datamodel) for various
reasons. You'll break the behaviour of:
* Custom getters/setters
@@ -15,7 +15,7 @@ reasons. You'll break the behaviour of:
* `[api:DataObject]`
* Database abstraction
-We'll explain some ways to use *SELECT* with the full power of SQL, but still maintain a connection to the Silverstripe
+We'll explain some ways to use *SELECT* with the full power of SQL, but still maintain a connection to the SilverStripe
[datamodel](/topics/datamodel).
## Usage
@@ -109,7 +109,7 @@ Useful for creating dropdowns.
### "Raw" SQL with DB::query()
-This is not recommended for most cases, but you can also use the Silverstripe database-layer to fire off a raw query:
+This is not recommended for most cases, but you can also use the SilverStripe database-layer to fire off a raw query:
:::php
DB::query("UPDATE Player SET Status='Active'");
@@ -142,10 +142,10 @@ This form of building a query has the following advantages:
* Selection of *ID*, *ClassName*, *RecordClassName*, which are necessary to use *buildDataObjectSet* later on
* Filtering records for correct *ClassName*
-### Transforming a result to DataObjectSet
+### Transforming a result to `[api:DataObjectSet]`
-This is a commonly used technique inside Silverstripe: Use raw SQL, but transfer the resulting rows back into
-DataObjects.
+This is a commonly used technique inside SilverStripe: Use raw SQL, but transfer the resulting rows back into
+`[api:DataObject]`s.
:::php
$sqlQuery = new SQLQuery();
@@ -183,16 +183,16 @@ DataObjects.
var_dump($myFirstPlayer->Status); // undefined, as we didn't LEFT JOIN the BasePlayer-table
-CAUTION: Depending on the selected columns in your query, you might get into one of the following scenarios:
+**CAUTION:** Depending on the selected columns in your query, you might get into one of the following scenarios:
* Not all object-properties accessible: You need to take care of selecting the right stuff yourself
* Overlayed object-properties: If you *LEFT JOIN* a table which also has a column 'Birthdate' and do a global select on
this table, you might not be able to access original object-properties.
-* You can't create DataObjects where no scalar record-data is available, e.g. when using *GROUP BY*
+* You can't create `[api:DataObject]`s where no scalar record-data is available, e.g. when using *GROUP BY*
* Naming conflicts with custom getters: A getter like Player->getName() will overlay the column-data selected in the
above example
-Be careful when saving back DataObjects created through *buildDataObjectSet*, you might get strange side-effects due to
+Be careful when saving back `[api:DataObject]`s created through *buildDataObjectSet*, you might get strange side-effects due to
the issues noted above.
## Using FormFields with custom SQL
View
8 docs/en/reference/staticpublisher.md
@@ -83,17 +83,17 @@ you can also add an exclusion
function allPagesToCache() {
$urls = array();
$pages = DataObject::get("SiteTree");
-
+
// ignored page types
$ignored = array('UserDefinedForm');
-
+
foreach($pages as $page) {
// check to make sure this page is not in the classname
if(!in_array($page->ClassName, $ignored)) {
$urls = array_merge($urls, (array)$page->subPagesToCache());
}
}
-
+
return $urls;
}
@@ -127,7 +127,7 @@ example](http://open.silverstripe.com/browser/modules/cms/trunk/code/staticpubli
.htaccess update simpler.
Just look for this line:
-
+
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
View
17 docs/en/reference/tablefield.md
@@ -2,9 +2,8 @@
## Introduction
-TableField behaves in the same manner as `[api:TableListField]`, however allows the editing of existing and adding of
-new rows.
-The data is saved back by the surrounding form-saving (mostly EditForm->save).
+`[api:TableField]` behaves in the same manner as `[api:TableListField]`, however allows the editing of existing and adding of
+new rows. The data is saved back by the surrounding form-saving (mostly EditForm->save).
See `[api:TableListField]` for more documentation on the base-class
@@ -66,15 +65,15 @@ Note: You still have to attach some form of `[api:Validator]` to the form to tri
### Nested Table Fields
-When you have TableField inside a `[api:ComplexTableField]`, the parent ID may not be known in your
-getCMSFields() method. In these cases, you can set a value to '$RecordID' in your TableField extra data, and this will
-be populated with the newly created record id upon save.
+When you have `[api:TableField]` inside a `[api:ComplexTableField]`, the parent ID may not be known in your
+getCMSFields() method. In these cases, you can set a value to '$RecordID' in your `[api:TableField]` extra data, and this
+will be populated with the newly created record id upon save.
## Known Issues
-* A TableField doesn't reload any submitted form-data if the saving is interrupted by a failed validation. After
-refreshing the form with the validation-errors, the TableField will be blank again.
-* You can't add **visible default data** to columns in a TableField, please use *setExtraData*
+* A `[api:TableField]` doesn't reload any submitted form-data if the saving is interrupted by a failed validation. After
+refreshing the form with the validation-errors, the `[api:TableField]` will be blank again.
+* You can't add **visible default data** to columns in a `[api:TableField]`, please use *setExtraData*
## API Documentation
View
24 docs/en/reference/tablelistfield.md
@@ -8,9 +8,9 @@ Provides customizeable columns, record-deletion by ajax, paging, sorting, CSV-ex
## Example
-Here's an example of a full featured TableListField implementation. It features editing members in the database directly
-as a button on each record, as well as filtering, and sorting. It also makes use of the 'export' permission, allowing
-export of data as a CSV.
+Here's an example of a full featured `[api:TableListField]` implementation. It features editing members in the database
+directly as a button on each record, as well as filtering, and sorting. It also makes use of the 'export' permission,
+allowing export of data as a CSV.
:::php
function getReportField() {
@@ -90,7 +90,7 @@ For more information on each of the features used in the example, you can read b
$customCsvQuery->select[] = "CONCAT(col1,col2) AS MyCustomSQLColumn";
$myTableListField->setCustomCsvQuery($customQuery);
-TableListField also tries to resolve Component-relations(has_one, has_many) and custom getters automatically:
+`[api:TableListField]` also tries to resolve Component-relations(has_one, has_many) and custom getters automatically:
:::php
$myTableListField = new TableListField(
@@ -139,12 +139,12 @@ Example (sorting by "FirstName" column):
);
-If you want to sort by custom getters in your DataObject, please reformulate them to a custom SQL column. This
+If you want to sort by custom getters in your `[api:DataObject]`, please reformulate them to a custom SQL column. This
restriction is needed to avoid performance-hits by caching and sorting potentially large datasets on PHP-level.
### Casting
-Column-values can be casted, based on the casting-types available through DBObject (sapphire/core/model/fieldtypes).
+Column-values can be casted, based on the casting-types available through DBObject (sapphire/core/model/fieldtypes).
:::php
$myTableListField->setFieldCasting(array(
@@ -155,7 +155,7 @@ Column-values can be casted, based on the casting-types available through DBObje
### Permissions
-Permissions vary in different TableListField-implementations, and are evaluated in the template.
+Permissions vary in different `[api:TableListField]`-implementations, and are evaluated in the template.
By default, all listed permissions are enabled.
:::php
@@ -237,7 +237,7 @@ implement averages etc.
)
);
-In TableField-implementation, these summaries also react to changes in input-fields by javascript.
+In `[api:TableListField]`-implementation, these summaries also react to changes in input-fields by javascript.
Available methods:
* sum
@@ -245,7 +245,7 @@ Available methods:
### Grouping
-Used to group by a specific column in the DataObject and create partial summaries.
+Used to group by a specific column in the `[api:DataObject]` and create partial summaries.
Please use only together with addSummary().
(Automatically disables sorting).
@@ -257,7 +257,7 @@ Please use only together with addSummary().
### Custom Sorting
-Please subclass TableListField to implement custom sorting, following the naming-convention
+Please subclass `[api:TableListField]` to implement custom sorting, following the naming-convention
"`colFunction_<yourFunctionName>`".
:::php
@@ -274,7 +274,7 @@ Please subclass TableListField to implement custom sorting, following the naming
In case you want to perform utility-functions like "export" or "print" through action-buttons,
make sure to subclass Utility() which collates all possible actions.
-### Customizing Look&Feel
+### Customizing Look & Feel
You can exchange the used template, e.g. to change applied CSS-classes or the HTML-markup:
@@ -285,4 +285,4 @@ You can exchange the used template, e.g. to change applied CSS-classes or the HT
## API Documentation
-[api:TableListField]
+`[api:TableListField]`
View
14 docs/en/reference/typography.md
@@ -4,8 +4,7 @@
SilverStripe lets you customise the style of content in the CMS.
## Usage
-This is done by setting up a CSS file called
-(projectname)/css/typography.css
+This is done by setting up a CSS file called (projectname)/css/typography.css.
You also need to create a file called (projectname)/css/editor.css with the following content:
@@ -40,8 +39,8 @@ It's important to realise that this CSS file is included directly into the CMS s
can alter the styling of other parts of the interface. While this is novel, it can be dangerous and is probably not
what you're after.
-The way around this is to limit all your styling selectors to elements inside something with class="typography". The
-other half of this is to put class="typography" onto any area in your template where you would like the styling to be
+The way around this is to limit all your styling selectors to elements inside something with `class="typography"`. The
+other half of this is to put `class="typography"` onto any area in your template where you would like the styling to be
applied.
**WRONG**
@@ -73,7 +72,7 @@ applied.
If you would to include different styles for different sections of your site, you can use class names the same as the
-name of the data fields. This example sets up different paragraph styles for 2 HTML editor fieldsc alled Content and
+name of the data fields. This example sets up different paragraph styles for 2 HTML editor fields called Content and
OtherContent:
:::css
@@ -89,7 +88,7 @@ OtherContent:
### Removing the typography class
Sometimes, it's not enough to add a class, you also want to remove the typography class. You can use the
-HTMLEditorField method setCSSClass.
+`[api:HTMLEditorField]` method setCSSClass.
This example sets another CSS class typographybis:
@@ -104,5 +103,4 @@ This example sets another CSS class typographybis:
}
-This functionality will be available in the version 2.0.2 of the CMS.
-
+**Note:** This functionality will be available in the version 2.0.2 of the CMS.
View
18 docs/en/reference/urlvariabletools.md
@@ -3,7 +3,7 @@
## Introduction
This page lists a number of "page options" , "rendering tools" or "special URL variables" that you can use to debug your
-sapphire applications. These are consumed in PHP using the $_REQUEST or $_GET superglobals throughout the Sapphire
+sapphire applications. These are consumed in PHP using the $_REQUEST or $_GET super globals throughout the Sapphire
core.
**General Usage**
@@ -18,8 +18,8 @@ Append the option and corresponding value to your URL in your browser's address
| URL Variable | | Values | | Description |
| ------------ | | ------ | | ----------- |
| flush | | 1,all | | This will clear out all cached information about the page. This is used frequently during development - for example, when adding new PHP or SS files. See below for value descriptions. |
- | showtemplate | | 1 | | Show the compiled version of all the templates used, including line numbers. Good when you have a syntax error in a template. Cannot be used on a Live site without **isDev** **flush** can be used with the following values: |
- | ?flush=1 | | | | | Flushes the current page and included templates |
+ | showtemplate | | 1 | | Show the compiled version of all the templates used, including line numbers. Good when you have a syntax error in a template. Cannot be used on a Live site without **isDev**. **flush** can be used with the following values: |
+ | ?flush=1 | | | | Flushes the current page and included templates |
| ?flush=all | | | | Flushes the entire template cache |
## General Testing
@@ -29,13 +29,13 @@ Append the option and corresponding value to your URL in your browser's address
| isDev | | 1 | | Put the site into [development mode](/topics/debugging), enabling debugging messages to the browser on a live server. For security, you'll be asked to log in with an administrator log-in |
| isTest | | 1 | | Put the site into [test mode](/topics/debugging), enabling debugging messages to the admin email and generic errors to the browser on a live server |
| debug | | 1 | | Show a collection of debugging information about the director / controller operation |
- | debug_request | | 1 | | Show all steps of the request from initial HTTPRequest to Controller to Template Rendering |
+ | debug_request | | 1 | | Show all steps of the request from initial `[api:HTTPRequest]` to `[api:Controller]` to Template Rendering |
## Classes and Objects
| URL Variable | | Values | | Description |
| ------------ | | ------ | | ----------- |
- | debugmanifest | | 1 | | Show the entire Sapphire manifest as currently built (Use /dev/build to rebuild) |
+ | debugmanifest | | 1 | | Show the entire Sapphire manifest as currently built (Use `/dev/build` to rebuild) |
| usetestmanifest | | 1 | | Force use of the default test manifest |
| debugmethods | | 1 | | Shows all methods available when an object is constructed (useful when extending classes or using object decorators) |
| debugfailover | | 1 | | Shows failover methods from classes extended |
@@ -52,7 +52,7 @@ Append the option and corresponding value to your URL in your browser's address
| URL Variable | | Values | | Description |
| ------------ | | ------ | | ----------- |
| debug_memory | | 1 | | Output the number of bytes of memory used for this request |
- | debug_profile | | 1 | | Enable the [profiler](/topics/debugging) for the duration of the request |
+ | debug_profile | | 1 | | Enable the [profiler](/topics/debugging) for the duration of the request |
| profile_trace | | 1 | | Includes full stack traces, must be used with **debug_profile** |
| debug_behaviour | | 1 | | Get profiling of [Behaviour.js](http://bennolan.com/behaviour) performance (Firebug recommended) |
| debug_javascript | | 1 | | Force debug-output on live-sites |
@@ -79,9 +79,9 @@ Redirections](security#redirect_back_to_another_page_after_login) for more infor
| Site URL | | Action |
| -------- | | ------ |
- | %%http://yoursite.com%%**/dev/build** | | Rebuild the entire database and manifest, see below for additional URL Variables |
- | %%http://yoursite.com%%**/admin/publishall/** | | Publish all pages on the site |
- | %%http://yoursite.com%%**/anypage/images/flush** | | Creates new images for the page by deleting the resized ones and going back to the original to create new resized one |
+ | http://yoursite.com**/dev/build** | | Rebuild the entire database and manifest, see below for additional URL Variables |
+ | http://yoursite.com**/admin/publishall/** | | Publish all pages on the site |
+ | http://yoursite.com**/anypage/images/flush** | | Creates new images for the page by deleting the resized ones and going back to the original to create new resized one |
### /dev/build
View
4 docs/en/reference/versioned.md
@@ -28,6 +28,4 @@ whenever a blog entry has been published.
mail("sam@silverstripe.com", "Blog published", "The blog has been published");
parent::onAfterPublish();
}
- }
-
-
+ }
View
28 docs/en/topics/access-control.md
@@ -19,22 +19,26 @@ It is unclear how this works for data-objects that are not pages.
In the security tab you can make groups for security. The way this was intended was as follows (this may be a counter
intuitive):
-- employees
-1. marketing
- - marketing executive
+
+* employees
+ * marketing
+ * marketing executive
+
Thus, the further up the hierarchy you go the MORE privileges you can get. Similarly, you could have:
-- members
-1. coordinators
- - admins
+
+* members
+ * coordinators
+ * admins
+
Where members have some privileges, coordinators slightly more and administrators the most; having each group inheriting
privileges from its parent group.
## Permission checking is at class level
-SilverStripe provides a security mechanism via the *Permission::check* method (see *LeftAndMain.php* for examples on how
+SilverStripe provides a security mechanism via the *Permission::check* method (see `[api:LeftAndMain]` for examples on how
the admin screens work)
-(next step -- go from *Permission::checkMember*...
+(next step -- go from *Permission::checkMember*...)
### Nuts and bolts -- figuring it out
@@ -44,14 +48,14 @@ works.
### Loading the admin page: looking at security
-If you go to [your site]/admin -- how does that work?
-*Director.php* maps the 'admin' URL request through a *Director* rule to the CMSMain controller (see `[api:CMSMain]`, with no arguments.
+If you go to [your site]/admin *Director.php* maps the 'admin' URL request through a `[api:Director]` rule to the
+`[api:CMSMain]` controller (see `[api:CMSMain]`, with no arguments).
-*CMSMain.init()* calls its parent which, of all things is called *LeftAndMain*. It's in *LeftAndMain* that the
+*CMSMain.init()* calls its parent which, of all things is called `[api:LeftAndMain]`. It's in `[api:LeftAndMain]` that the
important security checks are made by calling *Permission::check*.
`[api:Security::permissionFailure]` is the next utility function you can use to redirect to the login form.
### Customizing Access Checks in CMS Classes
-see `[api:LeftAndMain]`
+see `[api:LeftAndMain]`
View
13 docs/en/topics/configuration.md
@@ -1,9 +1,9 @@
-# Common Configuration through _config.php
+# Common configuration through _config.php
## Introduction
-Silverstripe doesn't have a global configuration-array or an interface with all available configuration-options. As all
-Silverstripe logic is contained in classes, the appropriate place to configure their behaviour is directly in the class
+SilverStripe doesn't have a global configuration-array or an interface with all available configuration-options. As all
+SilverStripe logic is contained in classes, the appropriate place to configure their behaviour is directly in the class
itself.
This lack of a configuration-GUI is on purpose, as we'd like to keep developer-level options where they belong (into
@@ -12,7 +12,7 @@ CMS"](http://www.silverstripe.com/core-team-discussion/flat/2723) for further re
In addition to these principle, some settings are
* Author-level configuration like interface language or date/time formats can be performed in the CMS "My Profile" section (`admin/myprofile`).
- * Group-related configuration like [api:HTMLEditorField] settings can be found in the "Security" section (`admin/security`).
+ * Group-related configuration like `[api:HTMLEditorField]` settings can be found in the "Security" section (`admin/security`).
* Site-wide settings like page titles can be set (and extended) on the root tree element in the CMS "Content" section (through the [siteconfig](/reference/siteconfig) API).
## _ss_environment.php
@@ -24,8 +24,9 @@ See [environment-management](/topics/environment-management).
This file is detected in each folder by `[api:ManifestBuilder]`. This way, every toplevel-folder (=module)
can have independent configuration-rules.
-//Please note that this is the only place where you can put in procedural code - all other functionality is wrapped in
-classes (see [common-problems](/installation/common-problems)).//
+
+Please note that this is the only place where you can put in procedural code - all other functionality is wrapped in
+classes (see [common-problems](/installation/common-problems)).
You can call most static methods from _config.php - classes will be loaded as required. Here's a list - **this is
incomplete - please add to it** *Try to keep it in alphabetical order too! :)*
View
28 docs/en/topics/controller.md
@@ -6,7 +6,7 @@ your SilverStripe site.
## Example
-mysite/code/Controllers/FastFood.php
+`mysite/code/Controllers/FastFood.php`
:::php
<?php
@@ -20,14 +20,14 @@ mysite/code/Controllers/FastFood.php
?>
-mysite/_config.php
+`mysite/_config.php`
:::php
Director::addRules(50, array('fastfood/$Action/$ID/$Name' => 'FastFood_Controller'));
-Request for '/fastfood/order/24/cheesefries' would result in the following to the $arguments above. If needed, use
-"?flush=1" on the end of request after making any code changes to your controller.
+Request for `/fastfood/order/24/cheesefries` would result in the following to the $arguments above. If needed, use
+`?flush=1` on the end of request after making any code changes to your controller.
:::ss
Array
@@ -42,12 +42,12 @@ Request for '/fastfood/order/24/cheesefries' would result in the following to th
In the above example the URLs were configured using the `[api:Director]` rules in the **_config.php** file.
Alternatively you can specify these in your Controller class via the **$url_handlers** static array (which gets
-processed by the RequestHandler).
+processed by the `[api:RequestHandler]`).
-This is useful when you want to subvert the fixed action mapping of 'fastfood/order/*' to the function **order**. In
-the case below we also want any orders coming through '/fastfood/drivethrough/' to use the same order function.
+This is useful when you want to subvert the fixed action mapping of `fastfood/order/*` to the function **order**. In
+the case below we also want any orders coming through `/fastfood/drivethrough/` to use the same order function.
-mysite/code/Controllers/FastFood.php
+`mysite/code/Controllers/FastFood.php`
:::php
class FastFood_Controller extends Controller {
@@ -59,15 +59,15 @@ mysite/code/Controllers/FastFood.php
## URL Patterns
-The RequestHandler class will parse all rules you specify against the following patterns.
+The `[api:RequestHandler]` class will parse all rules you specify against the following patterns.
**A rule must always start with alphabetical ([A-Za-z]) characters or a $Variable declaration**
- | Pattern | | Description |
- | ----------- | | --------------- |
- | `$` | | **Param Variable** - Starts the name of a paramater variable, it is optional to match this unless ! is used |
- | `!` | | **Require Variable** - Placing this after a parameter variable requires data to be present for the rule to match |
- | `//` | | **Shift Point** - Declares that only variables denoted with a $ are parsed into the $params AFTER this point in the regex |
+ | Pattern | Description |
+ | ----------- | --------------- |
+ | `$` | **Param Variable** - Starts the name of a paramater variable, it is optional to match this unless ! is used |
+ | `!` | **Require Variable** - Placing this after a parameter variable requires data to be present for the rule to match |
+ | `//` | **Shift Point** - Declares that only variables denoted with a $ are parsed into the $params AFTER this point in the regex |
## Examples
View
5 docs/en/topics/css.md
@@ -30,8 +30,9 @@ Or in your template (e.g. `themes/yourtheme/templates/Page.ss`):
:::ss
<% require css(mymodule/css/my.css) %>
-Management through the `Requirements` class has the advantage that modules can include their own CSS files without modifying your template.
-On the other hand, you as a template developer can "block" or change certain CSS files that are included from thirdparty code.
+Management through the `Requirements` class has the advantage that modules can include their own CSS files without modifying
+your template. On the other hand, you as a template developer can "block" or change certain CSS files that are included from
+thirdparty code.
## WYSIWYG editor: typography.css and editor.css
View
6 docs/en/topics/data-types.md
@@ -22,9 +22,9 @@ for introducing their usage.
## HTMLText vs. Text, and HTMLVarchar vs. Varchar
-The database field types HTMLVarchar and Varchar are exactly the same in the database. However, the templating engine
-knows to escape the Varchar field and not the HTMLVarchar field. So, it's important you use the right field if you
-don't want to be putting $FieldType.XML everywhere.
+The database field types `[api:HTMLVarchar]` and `[api:Varchar]` are exactly the same in the database. However, the
+templating engine knows to escape the `[api:Varchar]` field and not the `[api:HTMLVarchar]` field. So, it's important you
+use the right field if you don't want to be putting $FieldType.XML everywhere.
If you're going to put HTML content into the field, please use the field type with the HTML prefix. Otherwise, you're
going to risk double-escaping your data, forgetting to escape your data, and generally creating a confusing situation.
View
68 docs/en/topics/datamodel.md
@@ -20,9 +20,11 @@ See [database-structure](/reference/database-structure) for in-depth information
## Generating the database-schema
The SilverStripe database-schema is generated automatically by visiting the URL.
-`http://`<mysite>`/dev/build`
+`http://<mysite>/dev/build`
-> Note: You need to be logged in as an administrator to perform this command.
+<div class="notice" markdown='1'>
+Note: You need to be logged in as an administrator to perform this command.
+</div>
## Querying Data
@@ -46,8 +48,8 @@ Passing a *$join* statement to DataObject::get will filter results further by th
table. **It will NOT return the additionally joined data.** The returned *$records* will always be a
`[api:DataObject]`.
-When using *$join* statements be sure the string is in the proper format for the respective database engine. In MySQL
-the use of backticks may be necessary when referring Table Names and potentially Columns. (see [MySQL
+When using *$join* statements be sure the string is in the proper format for the respective database engine. In MySQL
+the use of back-ticks may be necessary when referring Table Names and potentially Columns. (see [MySQL
Identifiers](http://dev.mysql.com/doc/refman/5.0/en/identifiers.html)):
:::php
@@ -60,7 +62,6 @@ Identifiers](http://dev.mysql.com/doc/refman/5.0/en/identifiers.html)):
"0, 10");
-
## Properties
@@ -121,11 +122,15 @@ Here we combined a Player's first name and surname, accessible through $myPlayer
}
}
-**CAUTION: It is common practice to make sure that pairs of custom getters/setter deal with the same data, in a consistent
-format.**
+<div class="warning" markdown='1'>
+**CAUTION:** It is common practice to make sure that pairs of custom getters/setter deal with the same data, in a consistent
+format.
+</div>
-**CAUTION: Custom setters can be hard to debug: Please double check if you could transform your data in more
-straight-forward logic embedded to your custom controller or form-saving.**
+<div class="warning" markdown='1'>
+**CAUTION:** Custom setters can be hard to debug: Please double check if you could transform your data in more
+straight-forward logic embedded to your custom controller or form-saving.
+</div>
### Default Values
@@ -139,15 +144,17 @@ new object is created.
);
}
-> Note: Alternatively you can set defaults directly in the database-schema (rather than the object-model). See
+<div class="notice" markdown='1'>
+Note: Alternatively you can set defaults directly in the database-schema (rather than the object-model). See
[data-types](data-types) for details.
+</div>
### Casting
Properties defined in *static $db* are automatically casted to their [data-types](data-types) when used in templates.
You can also cast the return-values of your custom functions (e.g. your "virtual properties").
Calling those functions directly will still return whatever type your php-code generates,
-but using the *obj()*-method or accessing through a template will cast the value accordig to the $casting-definition.
+but using the *obj()*-method or accessing through a template will cast the value according to the $casting-definition.
:::php
class Player extends DataObject {
@@ -164,15 +171,9 @@ but using the *obj()*-method or accessing through a template will cast the value
}
-
-
-
-
-
## Relations
-Relations are built through static array definitions on a class, in the format:\\
-`<relationship-name>` => `<classname>`{php}
+Relations are built through static array definitions on a class, in the format `<relationship-name> => <classname>`
### has_one
@@ -202,8 +203,10 @@ parent element in the tree:
Defines 1-to-many joins. A database-column named ""`<relationship-name>`ID"" will to be created in the child-class.
-**CAUTION: Please specify a $has_one-relationship on the related child-class as well, in order to have the necessary
-accessors available on both ends.**
+<div class="warning" markdown='1'>
+**CAUTION:** Please specify a $has_one-relationship on the related child-class as well, in order to have the necessary
+accessors available on both ends.
+</div>
:::php
// access with $myTeam->Players() or $player->Team()
@@ -219,7 +222,7 @@ accessors available on both ends.**
}
-To specify multiple has_manys to the same object you can use dot notation to distinguish them like below
+To specify multiple $has_manys to the same object you can use dot notation to distinguish them like below
:::php
class Person {
@@ -241,7 +244,6 @@ Multiple $has_one relationships are okay if they aren't linking to the same obje
:::php
/**
-
* THIS IS BAD
*/
class Team extends DataObject {
@@ -261,8 +263,10 @@ Multiple $has_one relationships are okay if they aren't linking to the same obje
Defines many-to-many joins. A new table, (this-class)_(relationship-name), will be created with a pair of ID fields.
-**CAUTION: Please specify a $belongs_many_many-relationship on the related class as well, in order to have the necessary
-accessors available on both ends.**
+<div class="warning" markdown='1'>
+**CAUTION:** Please specify a $belongs_many_many-relationship on the related class as well, in order to have the necessary
+accessors available on both ends.
+</div>
:::php
// access with $myTeam->Categories() or $myCategory->Teams()
@@ -372,10 +376,6 @@ casting data before saving.
);
-
-
-
-
### onBeforeWrite
You can customize saving-behaviour for each DataObject, e.g. for adding security. These functions are private, obviously
@@ -411,8 +411,10 @@ Example: Disallow creation of new players if the currently logged-in player is n
}
-> Note: There are no separate methods for *onBeforeCreate* and *onBeforeUpdate*. Please check for the existence of
+<div class="notice" markdown='1'>
+Note: There are no separate methods for *onBeforeCreate* and *onBeforeUpdate*. Please check for the existence of
$this->ID to toggle these two modes, as shown in the example above.
+</div>
### onBeforeDelete
@@ -453,17 +455,13 @@ See `[api:SQLQuery]` for custom *INSERT*, *UPDATE*, *DELETE* queries.
## Decorating DataObjects
-You can add properties and methods to existing DataObjects like `[api:Member]` (a core class) without hacking core
+You can add properties and methods to existing `[api:DataObjects]`s like `[api:Member]` (a core class) without hacking core
code or subclassing.
Please see `[api:DataObjectDecorator]` for a general description, and `[api:Hierarchy]` for our most
popular examples.
-
-
-
-
## FAQ
### Whats the difference between DataObject::get() and a relation-getter?
@@ -471,7 +469,7 @@ You can work with both in pretty much the same way, but relationship-getters ret
A `[api:ComponentSet]` with relation-specific functionality.
:::php
- $myTeam = DataObject::get_by_id('Team',$myPlayer->TeamID); // returns DataObjectSet
+ $myTeam = DataObject::get_by_id('Team',$myPlayer->TeamID); // returns DataObject
$myTeam->add(new Player()); // fails
$myTeam = $myPlayer->Team(); // returns Componentset
View
8 docs/en/topics/debugging.md
@@ -32,17 +32,17 @@ use devmode on a public server very very carefully
Test mode is designed for staging environments or other private collaboration sites before deploying a site live. You do
not need to use test mode if you do not have a staging environment or a place for testing which is on a public server)
-In this mode error messages are hidden from the user and it includes BasicAuth integration if you want to password
+In this mode error messages are hidden from the user and it includes `[api:BasicAuth]` integration if you want to password
protect the site.
-To set your site to test mode set this in your mysite/_config.php file
+To set your site to test mode set this in your `mysite/_config.php` file
:::php
Director::set_environment_type("test");
A common situation is to enable password protected site viewing on your test site only. You can enable that but adding
-this to your mysite/_config file
+this to your `mysite/_config` file
:::php
if(Director::isTest()) BasicAuth::protect_entire_site();
@@ -54,7 +54,7 @@ Live sites should always run in live mode. Error messages are suppressed from th
to email the developers. This enables near real time reporting of any fatal errors or warnings on the site and can help
find any bugs users run into.
-To set your site to live mode set this in your mysite/_config.php file
+To set your site to live mode set this in your `mysite/_config.php` file
:::php
Director::set_environment_type("live");
View
6 docs/en/topics/directory-structure.md
@@ -2,7 +2,7 @@
## Introduction
-The directory-structure in Silverstripe it built on "convention over configuration", so the placement of some files and
+The directory-structure in SilverStripe it built on "convention over configuration", so the placement of some files and
directories is meaningful to its logic.
## Core Structure
@@ -16,7 +16,7 @@ Directory | Description
## Custom Code Structure
We're using `<mysite>` as an example - arbitrary directory-names are allowed, as long as they don't collide with
-existing modules or the directories listes in "Core Structure".
+existing modules or the directories lists in "Core Structure".
| Directory | Description |
| --------- | ----------- |
@@ -30,7 +30,7 @@ existing modules or the directories listes in "Core Structure".
## Themes Structure
| `themes/blackcandy/` | Standard "blackcandy" theme |
- | ------------------ | --------------------------- |
+ | ------------------ | --------------------------- |
| `themes/blackcandy_blog/` | Theme additions for the blog module |
| `themes/yourtheme/` | The themes folder can contain more than one theme - here's your own |
View
16 docs/en/topics/email.md
@@ -15,7 +15,7 @@ an external SMTP server (see [PHP documentation for mail()](http://php.net/mail)
By default, emails are sent in both HTML and Plaintext format.
A plaintext representation is automatically generated from the system
-by stripping HTML markup, or transformining it where possible
+by stripping HTML markup, or transforming it where possible
(e.g. `<strong>text</strong>` is converted to `*text*`).
:::php
@@ -35,7 +35,7 @@ The default HTML template is located in `sapphire/templates/email/GenericEmail.s
**Requirements: SilverStripe 2.3+**
-* Create a SS-template file called, in this example we will use 'MyEmail.ss' inside mysite/templates/email.
+* Create a SS-template file called, in this example we will use 'MyEmail.ss' inside `mysite/templates/email`.
* Fill this out with the body text for your email. You can use any [SS-template syntax](/topics/templates) (e.g. `<% control %>`,
`<% if %>`, $FirstName etc)
* Choose your template with **setTemplate()**
@@ -86,14 +86,14 @@ Usage:
### Administrator Emails
-The static function `Email::setAdminEmail()` can be called from a _config.php file to set the address that these
+The static function `Email::setAdminEmail()` can be called from a `_config.php` file to set the address that these
emails should originate from. This address is used if the `from` field is empty.
### Redirecting Emails
-* Email::send_all_emails_to($address) will redirect all emails sent to the given address. Handy for testing!
-* Email::cc_all_emails_to() and Email::bcc_all_emails_to() will keep the email going to its original recipients, but
-add an additional receipient in the BCC/CC header. Good for monitoring system-generated correspondence on the live
+* `Email::send_all_emails_to($address)` will redirect all emails sent to the given address. Handy for testing!
+* `Email::cc_all_emails_to()` and `Email::bcc_all_emails_to()` will keep the email going to its original recipients, but
+add an additional recipient in the BCC/CC header. Good for monitoring system-generated correspondence on the live
systems.
:::php
@@ -112,7 +112,7 @@ $value)**
..
-See http://en.wikipedia.org/wiki/E-mail#Message_header for a list of header names.
+See [Wikipedia E-mail Message header](http://en.wikipedia.org/wiki/E-mail#Message_header) for a list of header names.
### Newsletters
@@ -120,4 +120,4 @@ The [newsletter module](http://silverstripe.org/newsletter-module) provides a UI
## API Documentation
-`[api:Email]`
+`[api:Email]`
View
28 docs/en/topics/environment-management.md
@@ -8,17 +8,17 @@ them. Why should we have to go through the installation process and re-enter th
when we deploy them to our servers. Additionally, our production host's database connection details will likely be
different than our local server.
-SilverStripe comes with a solution to this: the "_ss_environment.php" file. You can put a single _ss_environment.php
+SilverStripe comes with a solution to this: the `_ss_environment.php` file. You can put a single `_ss_environment.php`
file in your "projects" folder on your development box, and it will be used by each of your development sites.
## Setting up your development machine with _ss_environment.php
-In this example, we assume that you are managing multiple projects as subfolders of "~/Sites/", and that you can visit
-these at "http://localhost/". For example, you might have a project at "~/Sites/myproject/", and visit it at
-"http://localhost/myproject/".
+In this example, we assume that you are managing multiple projects as subfolders of `~/Sites/`, and that you can visit
+these at `http://localhost/`. For example, you might have a project at `~/Sites/myproject/`, and visit it at
+`http://localhost/myproject/`.
-Create a new file, ~/Sites/_ss_environment.php. Put the following content in it, editing the values of the
-"SS_DATABASE_..."" and "SS_DEFAULT_ADMIN_..." defines as appropriate.
+Create a new file, `~/Sites/_ss_environment.php`. Put the following content in it, editing the values of the
+"SS_DATABASE_..." and "SS_DEFAULT_ADMIN_..." defines as appropriate.
:::php
<?php
@@ -53,21 +53,21 @@ of `$databaseConfig` and `Director::set_dev_servers`, and instead make sure that
## How it works
-The mechanism by which the "_ss_environment.php" files work is quite simple. Here's how it works:
+The mechanism by which the `_ss_environment.php` files work is quite simple. Here's how it works:
-* At the beginning of SilverStripe's execution, the _ss_environment.php file is searched for, and if it is found, it's
+* At the beginning of SilverStripe's execution, the `_ss_environment.php` file is searched for, and if it is found, it's
included. SilverStripe looks in 3 places for the file:
* The site's base folder (ie, a sibling of sapphire, jsparty, and cms)
* The parent of the base folder
* The grandparent of the base folder
-* The "_ss_environment.php" file sets a number of "define()".
-* "conf/ConfigureFromEnv.php" is included from within your "mysite/_config.php". This file has a number of regular
+* The `_ss_environment.php` file sets a number of "define()".
+* "conf/ConfigureFromEnv.php" is included from within your `mysite/_config.php`. This file has a number of regular
configuration commands that use those defines as their arguments. If you are curious, open up
-"sapphire/conf/ConfigureFromEnv.php" and see for yourself!
+`sapphire/conf/ConfigureFromEnv.php` and see for yourself!
### An Example
-This is my '_ss_environment.php' file. I have it placed in '/var', as each of the sites are in a subfolder of '/var'.
+This is my `_ss_environment.php` file. I have it placed in `/var`, as each of the sites are in a subfolder of `/var`.
:::php
<?php
@@ -98,7 +98,7 @@ This is my '_ss_environment.php' file. I have it placed in '/var', as each of th
// This causes errors to be written to the silverstripe.log file in the same directory as this file, so /var.
// Before PHP 5.3.0, you'll need to use dirname(__FILE__) instead of __DIR__
define('SS_ERROR_LOG', __DIR__ . '/silverstripe.log');
-
+
// This is used by sake to know which directory points to which URL
global $_FILE_TO_URL_MAPPING;
- $_FILE_TO_URL_MAPPING['/var/www'] = 'http://simon.geek.nz';
+ $_FILE_TO_URL_MAPPING['/var/www'] = 'http://simon.geek.nz';
View
11 docs/en/topics/error-handling.md
@@ -40,7 +40,7 @@ friendlier - much like the 404 page, the error content can be edited within the
* Set the error code to 500
* Publish the page.
-**HOW IT WORKS: **The publication script for ErrorPage will write the full HTML content, including the template styling,
+**HOW IT WORKS: **The publication script for `[api:ErrorPage]` will write the full HTML content, including the template styling,
to assets/error-500.html. The fatal error handler looks for the presence of this file, and if it exists, dumps the
content. This means that database access isn't required to provide a 500 error page.
@@ -55,7 +55,7 @@ You can indicate a log file relative to the site root. The named file will have
(an encoded file containing backtraces and things) will go to a file of a similar name, but with the suffix ".full"
added.
-<mysite>/_config.php:
+`<mysite>/_config.php`:
:::php
// log errors and warnings
@@ -66,7 +66,7 @@ added.
#### Deprecated method (SS 2.3 ?)
-<mysite>/_config.php:
+`<mysite>/_config.php`:
:::php
Debug::log_errors_to("/my/logfile/path");
@@ -77,7 +77,7 @@ added.
In addition to SilverStripe-integrated logging, it is adviseable to fall back to PHPs native logging functionality. A
script might terminate before it reaches the SilverStripe errorhandling, for example in the case of a fatal error.
-<mysite>/_config.php:
+`<mysite>/_config.php`:
:::php
ini_set("log_errors", "On");
@@ -88,7 +88,8 @@ script might terminate before it reaches the SilverStripe errorhandling, for exa
## Email Logs
You can send both fatal errors and warnings in your code to a specified email-address.
-<mysite>/_config.php:
+
+`<mysite>/_config.php`:
:::php
// log errors and warnings
View
12 docs/en/topics/extending-the-cms.md
@@ -5,14 +5,13 @@ CMSMain is part of the CMS. It is the controller for the content editor.
## Creating another hierarchical editor by subclassing CMSMain
Sometimes you'll want to provide an administration interface that is pretty much exactly what CMSMain provides, but it's
-not appropriate to include your data in with the site content. For example, Hayden developed a hierarchical category
-administrator on the Guano application.
+not appropriate to include your data in with the site content.
-Here's how you can do this:
+Here's how you can do this:
## Using classes other than SiteTree in the site tree
-It is possible to use to different classes in two separate site trees. In Guano for example, there is the usual site
+It is possible to use to different classes in two separate site trees. For example, there is the usual site
content tree and a category tree. To change that find:
:::php
@@ -50,12 +49,12 @@ where url is the relative link to the page (eg 'admin/categories'). You can chan
## Overloading EditForm
-You may need to overload EditForm if your class does not use the Versioned extension.
+You may need to overload EditForm if your class does not use the `[api:Versioned]` extension.
## Overloading SiteTreeAsUL
The tree hints can sometimes cause problems when reorganising the tree, and the CMSMain::SiteTreeAsUL function uses
-SiteTree explicitly. Use:
+`[api:SiteTree]` explicitly. Use:
:::php
public function SiteTreeAsUL() {
@@ -64,4 +63,3 @@ SiteTree explicitly. Use:
return $this->getSiteTreeFor( $this->stat('tree_class') );
}
-
View
4 docs/en/topics/form-validation.md
@@ -6,8 +6,8 @@ Form validation is a combination of PHP and JavaScript
### Introduction
-Validators are implemented as an argument to the [api:Form] constructor. You create a required fields validator like
-so. In this case, we're creating a [api:RequiredFields] validator - the [api:Validator] class itself is an abstract
+Validators are implemented as an argument to the `[api:Form]` constructor. You create a required fields validator like
+so. In this case, we're creating a `[api:RequiredFields]` validator - the `[api:Validator]` class itself is an abstract
class.
View
11 docs/en/topics/forms.md
@@ -33,7 +33,7 @@ Example:
## Subclassing a form
-It's the reponsibility of your subclass' constructor to call
+It's the responsibility of your subclass' constructor to call
:::php
parent::__construct()