fix(version-dropdown): allow deeper paths to API pages
This is a horrible hack but it works (for now). Really this needs to be made generic to cope with any level of path. Closes #970
This commit is contained in:
parent
4bc8ffaf58
commit
ee5096f916
|
@ -9,7 +9,19 @@
|
|||
if current.path[2]
|
||||
- var version = current.path[2].replace(/\_+/gm, ".")
|
||||
|
||||
if current.path[4]
|
||||
if current.path[6]
|
||||
if public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]][current.path[5]][current.path[6]]
|
||||
- var page = current.path[3] + '/' + current.path[4] + current.path[5] + current.path[6] + '/'
|
||||
else
|
||||
- var page = current.path[3] + '/' + current.path[4] + current.path[5] + current.path[6] + '.html'
|
||||
|
||||
else if current.path[5]
|
||||
if public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]][current.path[5]]
|
||||
- var page = current.path[3] + '/' + current.path[4] + current.path[5] + '/'
|
||||
else
|
||||
- var page = current.path[3] + '/' + current.path[4] + current.path[5] + '.html'
|
||||
|
||||
else if current.path[4]
|
||||
if public.docs[current.path[1]][current.path[2]][current.path[3]][current.path[4]]
|
||||
- var page = current.path[3] + '/' + current.path[4] + '/'
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue