contao / docs-archive

Contao Documentation
https://docs.contao.org/
Other
42 stars 76 forks source link

API - references #311

Closed lionel-m closed 9 years ago

lionel-m commented 9 years ago

Under references, the links are targeted to the branch 2.11.7

https://github.com/contao/core/blob/2.11.7/system/modules/registration/ModuleRegistration.php#L496

Should we use the master branch?

https://github.com/contao/core/blob/master/system/modules/core/modules/ModuleRegistration.php#L498
aschempp commented 9 years ago

I don't think so. The master branch will change over time and the links will break. It makes more sense to link to a specific version and maybe add another link to a second version if something has changed (e.g. the hook parameters)

lionel-m commented 9 years ago

Yes so we can use preferably the LTS versions for that... I'll update the links with the 3.5 version.

lionel-m commented 9 years ago

I'm not sure here for the first link:

- [index.php](https://github.com/contao/core/blob/2.11.7/index.php#L306)
- [system/modules/frontend/FrontendTemplate.php](https://github.com/contao/core/blob/2.11.7/system/modules/frontend/FrontendTemplate.php#L147)

Is this correct? I have not found other references...

- [...](https://github.com/contao/core/blob/3.5.0/system/modules/core/controllers/FrontendIndex.php#L361-L368)
- [...](https://github.com/contao/core/blob/3.5.0/system/modules/core/classes/FrontendTemplate.php#L224-L231)

Thanks

aschempp commented 9 years ago

It is, but maybe it would make sense to show both links? like index.php in Contao 2.11-3.2 / FrontendIndex.php in Contao 3.3+

lionel-m commented 9 years ago

I continue like this: Ok?

#### Versions from 2.11 to 3.2

- [index.php](https://github.com/contao/core/blob/2.11.7/index.php#L306)
- [system/modules/frontend/FrontendTemplate.php](https://github.com/contao/core/blob/2.11.7/system/modules/frontend/FrontendTemplate.php#L147)

#### Versions from 3.3

- [system/modules/core/controllers/FrontendIndex.php](https://github.com/contao/core/blob/3.5.0/system/modules/core/controllers/FrontendIndex.php#L361-L368)
- [system/modules/core/classes/FrontendTemplate.php](https://github.com/contao/core/blob/3.5.0/system/modules/core/classes/FrontendTemplate.php#L224-L231)

Examples are sometimes different between versions. We must also add several examples? The number of parameters can change too.

aschempp commented 9 years ago

I don't know if the FrontendTemplate changed significantly, so the version with headlines has the disadvantage of potentially listing the same thing multiple times without differences. My initial thought was like this:

- [index.php *in Contao 2.11 - 3.2*](https://github.com/contao/core/blob/2.11.7/index.php#L306)
- [FrontendIndex.php *in Contao 3.3+*](https://github.com/contao/core/blob/3.5.0/system/modules/core/controllers/FrontendIndex.php#L361-L368)
- [system/modules/frontend/FrontendTemplate.php](https://github.com/contao/core/blob/2.11.7/system/modules/frontend/FrontendTemplate.php#L147)

Your version might be clearer though… But if you say "from 3.3" then we should also link to the 3.3 version.

lionel-m commented 9 years ago

The code can be (~)identical but the disadvantage is that the folders structure changes...

I propose to highlight only the LTS versions. A link for 2.11, 3.2 and 3.5. The structure of the page remains the same and clear. What do you think?

aschempp commented 9 years ago

well that would need we need to update the links more often. On the other hand, there is no reason (from a release-cycle perspective) to keep the old LTS links. So we could also simply use links for only Contao 3.5 everywhere?

lionel-m commented 9 years ago

well that would need we need to update the links more often. On the other hand, there is no reason (from a release-cycle perspective) to keep the old LTS links. So we could also simply use links for only Contao 3.5 everywhere?

I totally agree with you :)

lionel-m commented 9 years ago

All references are based on version 3.5