Skip to content

Commit 3e725b7

Browse files
committed
update version folder structure for custom vhosts
1 parent bae77dc commit 3e725b7

File tree

4 files changed

+20
-18
lines changed

4 files changed

+20
-18
lines changed

Diff for: Internals/Overview.rst

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Entity & Event Listener Timing
99

1010
We regularly use Entity and Event listeners to execute specific actions. It is critical that we create those actions in the right type of listener, so that they are able to modify the entity at the right sequence. Failure to execute your code could result in your changes not being persisted, or other dirty states that will create errors.
1111

12+
NOTE: we have customized Doctrine's UnitOfWork file to add custom listeners that were lacking, and this has not been accepted by Doctrine's team (yet).
13+
1214
Below is a summary of the timing and order of operations for the UnitOfWork.php (not real PHP code) to help you understand what order methods are executed for the Listeners:
1315

1416

Diff for: Overview/Versioning.rst renamed to Overview/Content-Versioning.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
##########
2-
Versioning
3-
##########
1+
##################
2+
Content Versioning
3+
##################
44

55
Versioning allows an entity's revision history to be tracked. The best example of this in action is seen when editing content (i.e. pages or modules on a site). Whenever content is edited by a new user or if it's been more than a set period of time (e.g. 30 minutes) since the last time it was saved, then a new unpublished version of the content is created. The new version can be previewed on the site in "Preview" mode, but will not appear on the live site until the version is "Published".
66

Diff for: Overview/Features.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,6 @@ You can do advanced searches on one or more specific fields by using a special f
117117
Customization
118118
*************
119119

120-
The framework allows you to customize the generic PHP controller or Twig template for any content type by adding an identical file to the client's site ``/var/wwww/vhosts/{ID}/src/`` directory. Design Templates can also be customized in the same way by adding files to the ``Sitetheory/Template{TEMPLATE-NAME}Bundle/src/`` directory. Individual pages can have a unique controller only for that view ID by adding a similar file with the additional view ID appended to the name.
120+
The framework allows you to customize the generic PHP controller or Twig template for any content type by adding an identical file to the client's site in the relevant version ``/var/wwww/vhosts/{ID}/v/1/0/src/`` directory. Design Templates can also be customized in the same way by adding files to the ``Sitetheory/Template{TEMPLATE-NAME}Bundle/src/`` directory. Individual pages can have a unique controller only for that view ID by adding a similar file with the additional view ID appended to the name.
121121

122122
Learn more about :doc:`File Customizations </1.0/Tutorials/How-To-Customize-Files>`.

Diff for: Tutorials/How-To-Customize-Files.rst

+14-14
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ This has a cascading priority that lets you customize files in a very targeted m
2828
Namespace Path
2929
--------- -----
3030

31-
user /var/www/vhosts/100/user/1/
32-
siteTemplate /var/www/vhosts/100/src/Foo/TemplateBarBundle/src/
33-
site /var/www/vhosts/100/src/
34-
siteMasterTemplate /var/www/vhosts/9/src/Foo/TemplateBarBundle/src/
35-
siteMaster /var/www/vhosts/9/src/
31+
user /var/www/vhosts/100/user/1/v/1/0/
32+
siteTemplate /var/www/vhosts/100/v/1/0/src/Foo/TemplateBarBundle/src/
33+
site /var/www/vhosts/100/v/1/0/src/
34+
siteMasterTemplate /var/www/vhosts/9/v/1/0/src/Foo/TemplateBarBundle/src/
35+
siteMaster /var/www/vhosts/9/v/1/0/src/
3636
siteVendorTemplate /var/www/core/v/1/0/src/Foo/TemplateBarBundle/src/
3737
siteVendor /var/www/core/v/1/0/src/Foo/
3838
siteVendorMasterTemplate /var/www/core/v/1/0/src/Sitetheory/TemplateBarBundle/src/
@@ -178,8 +178,8 @@ For nested emulated bundles (where bundles customize another bundle) we make spe
178178
For vhosts with customized files, we must also make symlinks:
179179

180180
.. code-block:: shell
181-
/var/www/vhosts/100/assets/1/0/bundles/sitetheoryfoo -> /var/www/vhosts/100/src/Sitetheory/FooBundle/Resources/public/
182-
/var/www/vhosts/100/assets/1/0/bundles/sitetheorybar -> /var/www/vhosts/100/src/Sitetheory/BarBundle/Resources/public/
181+
/var/www/vhosts/100/assets/1/0/bundles/sitetheoryfoo -> /var/www/vhosts/100/v/1/0/src/Sitetheory/FooBundle/Resources/public/
182+
/var/www/vhosts/100/assets/1/0/bundles/sitetheorybar -> /var/www/vhosts/100/v/1/0/src/Sitetheory/BarBundle/Resources/public/
183183
184184
185185
Customization of Assets
@@ -239,7 +239,7 @@ So to overwrite the FooBundle file from:
239239
240240
You would put a file here:
241241
.. code-block:: shell
242-
/var/www/vhosts/100/src/Sitetheory/BarBundle/Resources/public/css/baz.css
242+
/var/www/vhosts/100/v/1/0/src/Sitetheory/BarBundle/Resources/public/css/baz.css
243243
244244
245245
@@ -348,13 +348,13 @@ If you are customizing a site and need to customize the vendor's custom Content
348348
Client Site Files
349349
*****************
350350

351-
Client Site files are located in the ``/var/www/vhosts/{ID}/src`` directory which mimics the exact structure of the core Sitetheory framework directory. To customize controllers or templates, just add the exact same file to the client’s site directory, e.g.
351+
Client Site files are located in the relevant version directory ``/var/www/vhosts/{ID}/v/1/0/src`` which mimics the exact structure of the core Sitetheory framework directory. To customize controllers or templates, just add the exact same file to the client’s site directory, e.g.
352352

353353
.. code-block:: shell
354354
355-
/var/www/vhosts/1/src/Sitetheory/MenuBundle/Controller/MenuPrimary.php
356-
/var/www/vhosts/1/src/Sitetheory/MenuBundle/Resources/views/MenuPrimary.html.twig
357-
/var/www/vhosts/1/src/Sitetheory/MenuBundle/Resources/public/css/menu.css
355+
/var/www/vhosts/1/v/1/0/src/Sitetheory/MenuBundle/Controller/MenuPrimary.php
356+
/var/www/vhosts/1/v/1/0/src/Sitetheory/MenuBundle/Resources/views/MenuPrimary.html.twig
357+
/var/www/vhosts/1/v/1/0/src/Sitetheory/MenuBundle/Resources/public/css/menu.css
358358
359359
Controllers must include the same namespace and object name as the original file as well. They literally are identical.
360360

@@ -377,14 +377,14 @@ If you need to customize a controller or template for a unique instance of a pag
377377
.. code-block:: shell
378378
:linenos:
379379
380-
/var/www/vhosts/1/src/Sitetheory/MenuBundle/Resources/views/MenuPrimary12345.html.twig
380+
/var/www/vhosts/1/v/1/0/src/Sitetheory/MenuBundle/Resources/views/MenuPrimary12345.html.twig
381381
382382
For Controllers, since you append the viewID to the filename you will also need to append it to the classname, e.g.
383383

384384
.. code-block:: php
385385
:linenos:
386386
387-
/var/www/vhosts/1/src/Sitetheory/MenuBundle/Controller/MenuPrimary12345.php
387+
/var/www/vhosts/1/v/1/0/src/Sitetheory/MenuBundle/Controller/MenuPrimary12345.php
388388
<?php
389389
class MenuPrimary12345 extends ContentController Base
390390
{

0 commit comments

Comments
 (0)