Project

General

Profile

Feature #1395

Updated by Alexander Watzinger over 3 years ago

With this feature individual content We want to avoid Git branches for different frontends can be configured as long as possible. Current issue is the content of the start page and an optional legal issue page. For this we will use the existing configuration functionality in the OpenAtlas backend per project. They are: admin (tab content). 

 * Intro for frontend *To do* 
 * Contact for frontend API: add functionality to get this content (with i18n) 
 * Legal notice for frontend 

 *Features* 
 * Can configure by users with the role manager admin/content 
 * Can be edited with an HTML editor  
 * Multi language support 

 *To do* 
 * Frontend: fetch and display intro and optional legal issue (with i18n) 

 *Technical* 
 There are 3 options, configurable in backend (admin/content): 
 * intro_for_frontend 
 * legal_notice_for_frontend 
 * contact_for_frontend 

 They can be requested in backend (currently in develop branch) by e.g. 
 <pre> 
 Content.get_translation('intro_for_frontend', 'de') 
 </pre> 
 I added a second language parameter (*'de'* in this example) because it seems the API isn't is not language aware. 
 If left empty, the language isn't available or the translation is empty the default language translation will be returned. 
 Should be relatively fail safe, worst case scenario is you get an empty string. 

 *Advantages* 
 * Update doesn't involve a manual Git pull or change on the server 
 * Manager of the backend could change it themselves, which would be faster and less work for us 
 * Easy to implement in backend because we already have this for e.g. backend intro, contact  
 * Can be changed with an HTML editor  
 * Multi language support 
 * Easily expandable for other content e.g. contact, legal issues

Back