-
Notifications
You must be signed in to change notification settings - Fork 156
[Getting Started] Fixed more sphinx stuff #113
Conversation
- Multi-site. | ||
- Multi-language. | ||
- Tree-like structure for easier management. | ||
- User defined URLs; |
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.
Hmm.. I've never seen semi-colons at the end of list items before, but maybe I'm being blind :)
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.
It's something that Fabian introduced in the core documentation. We generally end every list item with a semi colon, except the last one.
This is really good :) |
<symfony-cmf-routing-extra:controllers-by-type | ||
type="editablestatic" | ||
> | ||
sandbox_main.controller:indexAction |
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 think that whilst having the node value on its own line makes it much more readable, that extra whitespace also becomes part of the value, unless stripped by the RoutingExtraBundle. I say this because I am currently configuring parameters in the DIC XML config and they have to be inline with no surrounging whitespace (I really /want/ to do what you do here, but its not possible afaik)
[Getting Started] Fixed more sphinx stuff
thanks a ton wouter! |
@@ -66,6 +74,18 @@ menu ``simple``, the menu root node must be stored at ``/cms/menu/simple``. | |||
symfony_cmf_menu: | |||
menu_basepath: /cms/menu | |||
|
|||
.. code-block:: xml | |||
|
|||
<symfony-cmf-menu:config> |
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.
@wouterj i had a chat with @dantleech regarding the namespace prefixes. i wonder if we could not make those prefixes shorter, like cmf-menu
here. the symfony-
adds nothing and its just prefixes, so if ever somebody finds another cmf-menu prefix he can just use different namespace mappings. wdyt?
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.
@dbu I just had another idea to make the xml formats somewhat cleaner. We could set the default namespace to http://cmf.symfony.com/schema/dic/... inside the config element, that means we only need the prefix for the first element (config):
<container xmlns="http://symfony.com/schema/dic/symfony"
xmlns:cmf-menu="http://cmf.symfony.com/schema/dic/menu"
>
<!-- ... -->
<cmf-menu:config xmlns="http://cmf.symfony.com/schema/dic/menu">
<menu-basepath>/cms/menu</menu-basepath>
</cmf-menu:config>
</container>
I think it makes the xml format more readable, but it can also confuse people. What do you think?
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.
hm. advanced xml indeed. its elegant but when people copy-paste around xml fragments and are not too familiar with xml, it could easily end up in non-working things that are hard to understand. what does symfony core do in such cases?
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.
Ryan and I are discussing this for a long time. The core docs has as much working examples as possible (because Ryan wants that).
I think it's good to have some more readable examples when using advanced formats. For instance, I don't believe people who didn't have knowledge of XML will use it: (a) yaml is always easier to understand and (b) yaml is always before XML and (c) if they don't use yaml, they will use PHP because that's more familair.
I think the only people who use XML are people who know XML or people who write open source bundles (because XML is validationable). So I don't think it will be much of a problem to use advanced 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 can follow that reasoning, lets do the way you propose then.
This PR fixes every sphinx/doc standards stuff I could find in the Getting Started articles:
Please note this is not a WIP, it can be merged :)