Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add corresponding dataset page to download file and outbound click tables #374

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

rshewitt
Copy link
Contributor

@rshewitt rshewitt commented Dec 6, 2024

Changes proposed in this pull request:

related to #4992

security considerations

[Note the any security considerations here, or make note of why there are none]

{%- assign pageURL = 5 -%}
{%- if block.data[0][forloop.index0] == "pageTitle" -%}
<td align="right">
<a href="{{row[pageURL]}}" target="_blank">{{column | toLocaleString | replace: " - Catalog", ""}}</a>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this line doing exactly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the current column in row corresponds to the pageTitle column then add the original catalog page ( row[pageURL] ) the file was clicked on as a hyperlink with some string munging. i created the pageURL var to stand out and describe what the index represents rather than just doing row[5]. I can try to change this to make it more readable. frankly i'm not super familiar with templating languages.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i derive the dataset title from the html title using the pageTitle GA dimension which includes " - Catalog" at the end

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i derive the dataset title from the html title using the pageTitle GA dimension which includes " - Catalog" at the end

the string replace was the part that got me. i guess we do it for every dataset so i expect it's fine.

@rshewitt rshewitt merged commit ef644c8 into main Dec 9, 2024
6 checks passed
@rshewitt rshewitt deleted the add-dataset-title branch December 9, 2024 17:33
@rshewitt rshewitt restored the add-dataset-title branch December 9, 2024 19:04
@rshewitt rshewitt deleted the add-dataset-title branch December 9, 2024 19:09
@rshewitt rshewitt restored the add-dataset-title branch December 9, 2024 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants