mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #2097 from CheeseSucker/patch-1
Fixed a few documentation issues I've stumbled upon.
This commit is contained in:
commit
9a95db1998
@ -41,7 +41,7 @@ getting out of date.
|
||||
SilverStripe project that uses the ["docsviewer" module](https://github.com/silverstripe/silverstripe-docsviewer)
|
||||
to convert Markdown formatted files into searchable HTML pages with index lists.
|
||||
Its contents are fetched from different releases automatically every couple of minutes.
|
||||
* Developer API Docuumentation: [api.silverstripe.org](http://api.silverstripe.org) - powered by a customized
|
||||
* Developer API Documentation: [api.silverstripe.org](http://api.silverstripe.org) - powered by a customized
|
||||
[phpDocumentor](http://www.phpdoc.org/) template, and is regenerated automatically every night.
|
||||
|
||||
## Source Control
|
||||
|
@ -37,7 +37,7 @@ but makes its intent clearer, and allows reordering of placeholders in your tran
|
||||
|
||||
### Do I need to convert special characters (e.g. HTML-entities)?
|
||||
|
||||
Special characters (such as german umlauts) need to be entered in their native form. Please don't use HTML-entities ("ä" instead of "ä"). Silverstripe stores and renders most strings in UTF8 (Unicode) format.
|
||||
Special characters (such as german umlauts) need to be entered in their native form. Please don't use HTML-entities ("ä" instead of "ä"). Silverstripe stores and renders most strings in UTF8 (Unicode) format.
|
||||
|
||||
### How can I check out my translation in the interface?
|
||||
|
||||
|
@ -13,18 +13,18 @@ The basic .htaccess file after installing SilverStripe look like this:
|
||||
|
||||
<file>
|
||||
### SILVERSTRIPE START ###
|
||||
|
||||
|
||||
<Files *.ss>
|
||||
Order deny,allow
|
||||
Deny from all
|
||||
Allow from 127.0.0.1
|
||||
</Files>
|
||||
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
|
||||
|
||||
RewriteCond %{REQUEST_URI} !(\.gif$)|(\.jpg$)|(\.png$)|(\.css$)|(\.js$)
|
||||
|
||||
|
||||
RewriteCond %{REQUEST_URI} ^(.*)$
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule .* framework/main.php?url=%1&%{QUERY_STRING} [L]
|
||||
@ -34,12 +34,14 @@ The basic .htaccess file after installing SilverStripe look like this:
|
||||
|
||||
The `<Files>` section denies direct access to the template files from anywhere but the server itself.
|
||||
|
||||
The next section enables the rewriting engine and rewrites requests to `framework/main.php` if they meet the following
|
||||
The `<IfModule>` section enables the rewriting engine. Requests will be rewritten if they meet the following
|
||||
criteria:
|
||||
|
||||
* URI doesn't end in .gif, .jpg, .png, .css, or .js
|
||||
* The requested file doesn't exist on the filesystem `framework/main.php` is called with the REQUEST_FILENAME (%1) as the `url` parameter and also appends the original
|
||||
QUERY_STRING.
|
||||
* The requested file doesn't exist on the filesystem
|
||||
|
||||
The rewriting engine then calls `framework/main.php` with the REQUEST_FILENAME (%1) as the `url` parameter and also appends the original
|
||||
QUERY_STRING. **Example:** *"myblog/cakes?page=2"* is rewritten as *"framework/main.php?url=myblog/cakes&page=2"*.
|
||||
|
||||
See the [mod_rewrite documentation](http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html) for more information on how
|
||||
mod_rewrite works.
|
||||
@ -47,14 +49,14 @@ mod_rewrite works.
|
||||
|
||||
## main.php
|
||||
|
||||
All requests go through `main.`php, which sets up the environment and then hands control over to `Director`.
|
||||
All requests go through `main.php`, which sets up the environment and then hands control over to `Director`.
|
||||
|
||||
## Director and URL patterns
|
||||
|
||||
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()]`.
|
||||
|
||||
In general, the URL is build up as follows: `page/action/ID/otherID` - e.g. http://www.mysite.com/mypage/addToCart/12.
|
||||
In general, the URL is built up as follows: `page/action/ID/otherID` - e.g. http://www.mysite.com/mypage/addToCart/12.
|
||||
This will add an object with ID 12 to the cart.
|
||||
|
||||
When you create a function, you can access the ID like this:
|
||||
|
Loading…
Reference in New Issue
Block a user