Adding top category, subcategory and book path detection for go/libraries

Fix for sdk download form b/28425669

Fix for missing 'Develop' text in left nav on preview pages b/28450858

Change-Id: I0b7a5dc26dc3cb4be58aecbbad41cdf62e0331ba
This commit is contained in:
Amanda Kassay 2016-04-27 15:01:21 -04:00
parent f887aec708
commit c6d9cdce8d
2 changed files with 11 additions and 3 deletions

View File

@ -5,11 +5,11 @@
if:devsite ?>
<meta name="top_category" value="<?cs
if:ndk ?>ndk<?cs
elif:(guide||develop||training||reference||tools||sdk||google||reference.gms||reference.gcm||samples) ?>develop<?cs
elif:(guide||develop||training||reference||tools||sdk||google||reference.gms||reference.gcm||samples||preview) ?>develop<?cs
elif:(go||libraries) ?>develop<?cs
elif:(distribute||googleplay||essentials||users||engage||monetize||disttools||stories||analyze) ?>distribute<?cs
elif:(design||vision||material||patterns||devices||designdownloads) ?>design<?cs
elif:(about||versions||wear||tv||auto) ?>about<?cs
elif:preview ?>preview<?cs
else ?>none<?cs
/if ?>" />
<?cs set:dac_subcategory_set = #1 ?>
@ -34,6 +34,9 @@
if:(samplesDocPage&&!samplesProjectIndex) ?> samples-docpage<?cs /if ?><?cs
else ?>none<?cs set:dac_subcategory_set = #0 ?><?cs /if ?><?cs
elif:(google||reference.gms||reference.gcm) ?>google<?cs
elif:(go||libraries) ?><?cs
if:libraries ?>libraries<?cs
else ?>none<?cs set:dac_subcategory_set = #0 ?><?cs /if ?><?cs
elif:(distribute||googleplay||essentials||users||engage||monetize||disttools||stories||analyze) ?><?cs
if:googleplay ?>googleplay<?cs
elif:essentials ?>essentials<?cs
@ -69,6 +72,8 @@
elif:sdk ?>/tools<?cs
elif:samples ?>/samples<?cs /if ?><?cs
elif:(google||reference.gms||reference.gcm) ?>/google<?cs
elif:(go||libraries) ?>/go<?cs
if:libraries ?>/libraries<?cs /if ?><?cs
elif:(distribute||googleplay||essentials||users||engage||monetize||disttools||stories||analyze) ?>/distribute<?cs
if:googleplay ?>/googleplay<?cs
elif:essentials ?>/essentials<?cs

View File

@ -449,7 +449,7 @@ tools release notes</a>.</p>
idname = bundlename + "-size";
sizeMB = $(idname).text().split(' MB')[0];
$('.download-bundle-button > .small').html(" for " + os + " <em>(" + sizeMB + " MB)</em>");
$('.download-bundle-button').click(function() {return onDownload(this,true,true);}).attr('href', bundlename);
$('.download-bundle-button').click(function() { onDownload(this,true,true);}).attr('href', bundlename);
}
@ -581,11 +581,14 @@ tools release notes</a>.</p>
</div><!-- end g-unit -->
<?cs include:"trailer.cs" ?>
<?cs if:!devsite ?>
<script src="https://developer.android.com/ytblogger_lists_unified.js?v=17" type="text/javascript"></script>
<script src="/jd_lists_unified.js?v=17" type="text/javascript"></script>
<script src="/jd_extras.js?v=17" type="text/javascript"></script>
<script src="/jd_collections.js?v=17" type="text/javascript"></script>
<script src="/jd_tag_helpers.js?v=17" type="text/javascript"></script>
<?cs /if ?><!--end !devsite -->
<!-- Start of Tag -->
<script type="text/javascript">