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 preview
    return if perform_redirect!
    com = community(request)
    cid = com.id
    is_private = com.private?
    user_logged_in = user(request).present?
    cta = is_private && !user_logged_in ? "signup" : "search" 
    default_locale = community(request).default_locale
    preview_version = parse_int(params[:preview_version])
    locale_param = params[:locale]
    begin
      structure = CLP::LandingPageStore.load_structure(cid, preview_version)
      headers["X-Robots-Tag"] = "none"
      self.status = 200
      self.response_body = render_landing_page(
        default_locale: default_locale,
        locale_param: locale_param,
        structure: structure,
        cta: cta
      )
    rescue CLP::LandingPageContentNotFound
      render_not_found()
    end
  end
def preview return if perform_redirect! com = community ( request ) cid = com . id is_private = com . private? user_logged_in = user ( request ) . present? cta = is_private && ! user_logged_in ? "signup" : "search" default_locale = community ( request ) . default_locale preview_version = parse_int ( params [ :preview_version ] ) locale_param = params [ :locale ] begin structure = CLP :: LandingPageStore . load_structure ( cid , preview_version ) headers [ "X-Robots-Tag" ] = "none" self . status = 200 self . response_body = render_landing_page ( default_locale : default_locale , locale_param : locale_param , structure : structure , cta : cta ) rescue CLP :: LandingPageContentNotFound render_not_found ( ) end end
Shorthand for accessing CustomLandingPage service namespace
Shorthand for accessing CustomLandingPage service namespace
# cta: Call to action # Tell robots to not index and to not follow any links