Given //site/variable, what are the steps to resolve the template & content.
The priority is from higher to lower. Once a match is found, the chain breaks.
- Check if
variableis a hardcoded url (like the footer links, about page, login page etc.) - Decompose
variableinto its parts (e.g.["inner-circle", "special-reports"]) - Check if the first part belongs to a subscription (e.g. inner-circle).If it's part of a subscription, use the rules for it (next segment).
- If it's not part of a subscription, we assume it is free content. Use the template for content and ask the lambda function for the proper
_id. - No match found, show a 404 page.
/sub-code/-> the subscription's dashboard/sub-code/special-reports-> the list of special reports (where the "view all reports" link leads)/sub-code/archives-> issues & updates (where the "view all issues & updates" link leads)/sub-code/portfolio-> the portfolio page for the subscription/sub-code/training-> the training page (not implemented yet)- Reports can belong to multiple products, so they will not have
/sub-codein-front. It will have a/reportprefix. /sub-code/???-> it would match a single issue/report.
- What should the url for "my subscriptions" be? (it belongs to rule 1 in the Logic section)
- What is the proper url for a special report?
/reports/???. It would need to include a unique identifier. Possible example:/reports/the actual title.${_id} - Same Q for the issues/updates.
- Do we have a free content in our Mongo set for which we know its real url to help implement the matching for the free articles?