= Background information
The apps display information in the footer of each article. It should be possible to append this footer via a js function call in `mobile-html` articles.
= What
`pagelib.c1.PageMods.appendFooter(articleTitle, menuItems, hasReadMore, readMoreItemCount, localizedStrings)`
There's existing functionality in the page library for this that might be able to be adapted to work with mobile-html. The iOS app wraps the existing page library code to append the footer here:
https://github.com/wikimedia/wikipedia-ios/blob/develop/www/js/footers.js#L11
In practice, the call would look something like:
```
pagelib.c1.PageMods.addFooter(
document,
'Knight Lore', // articleTitle
[pagelib.c1.Footer.MenuItemType.languages, pagelib.c1.Footer.MenuItemType.lastEdited, pagelib.c1.Footer.MenuItemType.pageIssues, pagelib.c1.Footer.MenuItemType.disambiguation, pagelib.c1.Footer.MenuItemType.talkPage], // menuItems
true, // hasReadMore
3, // readMoreItemCount
{
"readMoreHeading":"READ MORE",
"menuDisambiguationTitle":"Similar pages",
"menuLanguagesTitle":"Available in 9 other languages",
"menuHeading":"ABOUT THIS ARTICLE",
"menuLastEditedSubtitle":"Full edit history",
"menuLastEditedTitle":"Edited today",
"licenseString":"Content is available under $1 unless otherwise noted.",
"menuTalkPageTitle":"View talk page",
"menuPageIssuesTitle":"Page issues",
"viewInBrowserString":"View article in browser",
"licenseSubstitutionString":"CC BY-SA 3.0",
"menuCoordinateTitle":"View on a map"
} // localizedStrings
)
```
And produce something like:
{F29604814}
Design TBD and can be iterated on after functionality is delivered, but would be ideally unified across iOS and Android T226094
The menu items are different for different articles, so all available menu item types should be supported:
```
const MenuItemType = {
languages: 1,
lastEdited: 2,
pageIssues: 3,
disambiguation: 4,
coordinate: 5,
talkPage: 6
}
```
There should also be an additional menu item type, `references: 7` to support native references handling: T218144
= Open questions
The `mobile-html` js would have to have a way to ask the apps whether or not the user has the related pages saved to display the appropriate bookmark state. It would also need to communicate taps on other footer items as well as save/unsave events when the user taps the save/unsave button on an article. This could be handled by the same interaction handler defined in T219998