-
Notifications
You must be signed in to change notification settings - Fork 156
[WIP] Initial version of creating a basic CMS #303
Conversation
|
||
The SimpleCmsBundle combines the route, menu and content into a single document and uses a custom | ||
router. This approach will combine only the menu and content into a single document and the routes | ||
will be managed automatically and the native CMF ``DynamicRouter`` will be used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this is a legitimate simplification for the purposes of this article. SimpleCmsBundle uses a custom route provider and it also uses the standard DynamicRouter code .. but it does use a separate service.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i am unsure if the reference to simplecms helps everybody here. maybe it would make sense to just describe the problem (route for content) and the solution (autocreate them). and then have a .. note::
saying "If you know the SimpleCmsBundle, you might notice that it takes a different approach...".
It would also be neat to add a "/" or homepage route. Is the best practice for this to add a redirect to |
The base routing node is the one that's used for routing |
@dantleech are you using multilang? then you should use LuneticsLocaleBundle. if you don't then it depends. if your home page has content, have the route at /cms/routes point to your content. if you want to write a specific controller and have no content, using a symfony route would be the thing. |
@dbu no multilang. I will add the route as you suggest.
Still WIP. |
Please use the symfony heading character standards. |
Creating a basic CMS using the RoutingAutoBundle | ||
************************************************ | ||
|
||
**Level**: Intermediate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imho such "level" indications help little. people will look at the cookbook entries for the things they want to do, regardless of level. what i do think is extremly useful is the rest of this intro telling what we do and which bundles we are going to use. that is helping me decide if i care about the tutorial.
if anything schematic, i would propose to formalize this, having a sort of heading table saying with sections Goals, Bundles Used, Prerequisites. the prerequisites would tell which book chapters you are supposed to already know in order to do this, so that we do not have to repeat how odm annotations work all the time and such things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I indeed don't think this will be really valuable. If some knowledge is required, there should be a reference to a section explaining it in the text where it's required. Or something like a .. seealso::
directive.
coming good, this article. i like it! can you break lines after 80 characters please? travis tells that the link to routing-auto-bundle is not working. |
@@ -0,0 +1,1066 @@ | |||
************************************************ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing index directive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
share much of the same logic, so lets create a ``trait`` to reduce code duplication:: | ||
|
||
// src/Acme/BasicCmsBundle/Document/ContentTrait.php | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this line
could you please remove all new lines after the file comment, except for the cases where the next line is a comment? |
This PR is starting to become somewhat difficult to maintain. I hope that I have now fixed all the issues. |
yes sorry, I switched a bit too much from commit commenting and PR commenting. If I find anything, I'll commit myself :) |
There exists a bundle called :doc:`../bundles/simple_cms/index` which | ||
provides a similar solution to the one proposed in this tutorial. It | ||
combines the route, menu and content into a single document and uses a | ||
custom router. This approach differs in that it will combine only the menu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This approach => The approach taken in this tutorial will combine only the...
You forgot to include the file in the toctree of |
yep, this is getting really long. can you add it to the index and maybe do the 2 content inputs i have (code comments above this comment)? then lets merge and we can still improve it further later on. |
This is a complete tutorial on creating a simple (or basic) CMS using the RoutingAuto bundle. See https://github.com/dantleech/tutorial-basic-cms This was originally concieved as a blog post, maybe it should stay that way...
- Added some diagrams - Various
ok! I have done another read-through and addressed (I think) the outstanding comments. I'm good for this to be merged. |
[WIP] Initial version of creating a basic CMS
Thank you! This must be our biggest PR till now! (I hope there is a badge for that...) |
Yay. I am going to continue drinking red wine in celebration :) Thanks for all the CRs. |
Oh nuts. The images are broken: http://symfony.com/doc/master/cmf/cookbook/create_basic_cms_auto_routing.html |
they are now working, uploading only happens at 2 AM european time, while the docs get updated 15 min. after merging |
This is a complete tutorial on creating a simple (or basic) CMS from the PHPCR-ODM Standard Edition distribution using the RoutingAuto bundle.
See https://github.com/dantleech/tutorial-basic-cms
This was originally conceived as a blog post, maybe it should stay that way... not sure if we want to add tutorials for RoutingAuto when it is still not tested in the field, but then again maybe this is a good way to get it into the field :)