You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment the response from content store is being modelled in two places:
ContentItem model - This is a new model added to allow the creation of subclasses of ContentItem based on the document_type, that would then allow document_type specific behaviour to be modelled.
Ideally ContentItemPresenter should take an instance of the ContentItem model and add presentation code on top of it.
The move of Travel Advice country pages from government-frontend has highlighted the issues with the presenters. A page_title method needed to be added to the presenter. The page_title is reliant on the withdrawn status of the content item to determine how to build the title. The withdrawn status was added to the ContentItem model, but this meant that it wasn't accessible to the presenter without either duplicating the modelling code in the presenter or creating a new presenter. The second option was chosen as a stop-gap until the presenter logic is updated.
The text was updated successfully, but these errors were encountered:
At the moment the response from content store is being modelled in two places:
Ideally
ContentItemPresenter
should take an instance of theContentItem
model and add presentation code on top of it.The move of Travel Advice country pages from government-frontend has highlighted the issues with the presenters. A
page_title
method needed to be added to the presenter. Thepage_title
is reliant on the withdrawn status of the content item to determine how to build the title. The withdrawn status was added to the ContentItem model, but this meant that it wasn't accessible to the presenter without either duplicating the modelling code in the presenter or creating a new presenter. The second option was chosen as a stop-gap until the presenter logic is updated.The text was updated successfully, but these errors were encountered: