app/controllers/landing_page_controller.rb
# Shorthand for accessing CustomLandingPage service namespace
Shorthand for accessing CustomLandingPage service namespace
Shorthand for accessing CustomLandingPage service namespace
def render_landing_page(default_locale:, locale_param:, structure:, cta:)
    c = community(request)
    landing_page_locale, sitename = structure["settings"].values_at("locale", "sitename")
    topbar_locale = locale_param.present? ? locale_param : default_locale
    initialize_i18n!(c&.id, landing_page_locale)
    FeatureFlagHelper.init(community_id: c.id,
                           user_id: nil,
                           request: request,
                           is_admin: false,
                           is_marketplace_admin: false)
    props = topbar_props(c,
                         community_customization(request, landing_page_locale),
                         request.fullpath,
                         locale_param,
                         topbar_locale,
                         true)
    marketplace_context = marketplace_context(c, topbar_locale, request)
    denormalizer = build_denormalizer(
      cid: c&.id,
      cta: cta,
      locale_param: locale_param,
      default_locale: default_locale,
      landing_page_locale: landing_page_locale,
      sitename: sitename
    )
    render_to_string :landing_page,
           locals: { font_path: FONT_PATH,
                     landing_page_locale: landing_page_locale,
                     landing_page_url: "#{c.full_url}#{request.fullpath}",
                     styles: landing_page_styles,
                     javascripts: {
                       location_search: location_search_js,
                       translations: js_translations(topbar_locale)
                     },
                     topbar: {
                       enabled: true,
                       props: props,
                       marketplace_context: marketplace_context,
                       props_endpoint: ui_api_topbar_props_path(locale: topbar_locale, landing_page: true)
                     },
                     page: denormalizer.to_tree(structure, root: "page"),
                     sections: denormalizer.to_tree(structure, root: "composition"),
                     community_context: community_context(request, landing_page_locale),
                     feature_flags: FeatureFlagHelper.feature_flags,
                     asset_host: APP_CONFIG.asset_host,
                   }
  end
def render_landing_page ( default_locale : , locale_param : , structure : , cta : ) c = community ( request ) landing_page_locale , sitename = structure [ "settings" ] . values_at ( "locale" , "sitename" ) topbar_locale = locale_param . present? ? locale_param : default_locale initialize_i18n! ( c &. id , landing_page_locale ) FeatureFlagHelper . init ( community_id : c . id , user_id : nil , request : request , is_admin : false , is_marketplace_admin : false ) props = topbar_props ( c , community_customization ( request , landing_page_locale ) , request . fullpath , locale_param , topbar_locale , true ) marketplace_context = marketplace_context ( c , topbar_locale , request ) denormalizer = build_denormalizer ( cid : c &. id , cta : cta , locale_param : locale_param , default_locale : default_locale , landing_page_locale : landing_page_locale , sitename : sitename ) render_to_string :landing_page , locals : { font_path : FONT_PATH , landing_page_locale : landing_page_locale , landing_page_url : "#{c.full_url}#{request.fullpath}" , styles : landing_page_styles , javascripts : { location_search : location_search_js , translations : js_translations ( topbar_locale ) } , topbar : { enabled : true , props : props , marketplace_context : marketplace_context , props_endpoint : ui_api_topbar_props_path ( locale : topbar_locale , landing_page : true ) } , page : denormalizer . to_tree ( structure , root : "page" ) , sections : denormalizer . to_tree ( structure , root : "composition" ) , community_context : community_context ( request , landing_page_locale ) , feature_flags : FeatureFlagHelper . feature_flags , asset_host : APP_CONFIG . asset_host , } end
Shorthand for accessing CustomLandingPage service namespace
Shorthand for accessing CustomLandingPage service namespace
# Init feature flags with marketplace specific flags, skip personal
default_locale
locale_param
structure
cta