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

Need to be able to use Page Title as the link name in the index page. #13

Open
risteardc opened this issue Feb 28, 2017 · 1 comment
Open

Comments

@risteardc
Copy link

risteardc commented Feb 28, 2017

In our gulp/grunt build we can reference the page title in our index list. This means we can match our page names with corresponding components or page templates in the functional spec. This makes life a lot easier in terms of FE dev and QA testing. There is no ambiguity to which component or page template someone is talking about.

In the pageList.cshtml we are referencing the list of pages by the @filename value.

In a perfect world this would use @ViewBag.Title (or something referenced from the page file directly) instead.

@jordanrobinson
Copy link
Member

Best way we've thought of doing this is to have a variable set in the file in the ViewBag, so for example ViewBag.Title = "blarg"; in the file. This would then be picked up by a modified gulp task based on the one located here: https://github.com/buildingblocks/bb-prototype-website/blob/master/gulp/page-list.js#L46 and instead of reading it out json-wise it would look for that variable (probably through a regex or something similar).

This would then output a listing.json from the gulp task, that we would read and display instead of looking at the filesystem here https://github.com/buildingblocks/bb-prototype-website-razor/blob/develop/Views/Components/_bb/pageList.cshtml#L5 which should let us render out a title instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants