<%
# Asciibinder doesn't set subgroups for multi groups (more than 2). So this
# hack sets it here based on the topic id, which is of the form:
# Welcome1::Welcome2::Welcome3::Welcome3TopicTitle

  if topic_id.scan(/::/).length == 3
    topics = topic_id.split("::")
    subgroup_id = topics[0] + "::" + topics[1]
    subsubgroup_id = topics[0] + "::" + topics[1] + "::" + topics[2]
    # TO DO if breadcrumbs become an issue
    #breadcrumb_subsubgroup_block = ""
    breadcrumb_topic = topic_title
  end
%>

<%= render("_templates/_page_openshift.html.erb",
           :distro_key => distro_key,
           :distro => distro,
           :version => version,
           :site_name => site_name,
           :group_id => group_id,
           :group_title => group_title,
           :subgroup_id => subgroup_id,
           :subsubgroup_id => subsubgroup_id,
           :subgroup_title => subgroup_title,
           :subsubgroup_title => subsubgroup_title,
           :topic_id => topic_id,
           :topic_title => topic_title,
           :article_title => article_title,
           :content => content,
           :navigation => navigation,
           :css_path => css_path,
           :javascripts_path => javascripts_path,
           :images_path => images_path,
           :template_path => template_path,
           :site_home_path => site_home_path,
           :breadcrumb_group => breadcrumb_group,
           :breadcrumb_root => breadcrumb_root,
           :breadcrumb_subgroup_block => breadcrumb_subgroup_block,
           :breadcrumb_subsubgroup_block => breadcrumb_subsubgroup_block,
           :breadcrumb_topic => breadcrumb_topic,
           :subtopic_shim => subtopic_shim,
           :repo_path => repo_path) %>
