[TYPO3-doc] NEW: Now there's a VERSIONSWITCHER button
Martin Bless
m.bless at gmx.de
Fri May 3 10:19:21 CEST 2013
Hello François,
>BTW currently the branches are not named the same across all manuals. Is
>that a problem for you
No, I don't think so. We need to stick to a folder structure for
each manual that we can handle by rewriting (mod_rewrite) on the
server anyway.
And in my script I'm making the same assumptions which look like
this at the moment:
function isValidVersionFolderName($filename) {
$isValid = false;
if (!$isValid) { // named versions
if (in_array( $filename, array('latest'))) {
$isValid = true;
}
}
if (!$isValid) { // numbered versions (like 1.2.3...)
$pattern = '~\d+(\.\d+)*~is';
$subpattern = array();
$result = preg_match($pattern, $filename, $subpattern);
if ($result and ($subpattern[0] === $filename)) {
$isValid = true;
}
}
return $isValid;
}
As you can see we can extend this and build in more
"intelligence". We'll extend this somehow for example once we
start with languages like .../4.7/ru/...
FYI: I'll push the latest changes to
https://github.com/marble/typo3-docs-typo3-org-resources
in the next days.
>That latest progress has really made my day :-)
Same with me :-)
Martin
--
Certified TYPO3 Integrator | TYPO3 Documentation Team Member
http://mbless.de
More information about the TYPO3-project-documentation
mailing list