Difference between revisions of "Template:ContentTemplateModernInline"

From Holdfast: Nations At War
Jump to navigation Jump to search
Line 33: Line 33:
  
 
   <div class="cpage__main" role="main" style="margin-bottom:{{{gap|1rem}}};">
 
   <div class="cpage__main" role="main" style="margin-bottom:{{{gap|1rem}}};">
     {{#if:{{{about_content|}}}|{{SectionTemplate|title={{{about_title|About}}}|content={{{about_content}}}}}|}}
+
     {{#if:{{{about_content|}}}|{{SectionTemplate|title={{{about_title|About}}}|content={{{about_content}}}}}|}}<nowiki/><!--trim-->
     {{#if:{{{featured_content|}}}|{{SectionTemplate|title={{{featured_title|Featured}}}|content={{{featured_content}}}}}|}}
+
 
     {{#if:{{{news_content|}}}|{{SectionTemplate|title={{{news_title|News}}}|content={{{news_content}}}}}|}}
+
    <!-- Featured: render only if explicit content OR /Body exists -->
 +
     {{#if:{{{featured_content|}}}
 +
      | {{SectionTemplate|title={{{featured_title|Featured}}}|content={{{featured_content}}}}}
 +
      | {{#ifexist:{{FULLPAGENAME}}/Body
 +
          | {{SectionTemplate|title={{{featured_title|Featured}}}|content={{:{{FULLPAGENAME}}/Body}} }}
 +
        }}
 +
    }}<nowiki/><!--trim-->
 +
 
 +
     {{#if:{{{news_content|}}}|{{SectionTemplate|title={{{news_title|News}}}|content={{{news_content}}}}}|}}<nowiki/><!--trim-->
 
   </div>
 
   </div>
  
Line 52: Line 60:
  
 
   <div class="cpage__main" role="main" style="flex:1 1 auto;min-width:0;">
 
   <div class="cpage__main" role="main" style="flex:1 1 auto;min-width:0;">
     {{#if:{{{about_content|}}}|{{SectionTemplate|title={{{about_title|About}}}|content={{{about_content}}}}}|}}
+
     {{#if:{{{about_content|}}}|{{SectionTemplate|title={{{about_title|About}}}|content={{{about_content}}}}}|}}<nowiki/><!--trim-->
     {{#if:{{{featured_content|}}}|{{SectionTemplate|title={{{featured_title|Featured}}}|content={{{featured_content}}}}}|}}
+
 
     {{#if:{{{news_content|}}}|{{SectionTemplate|title={{{news_title|News}}}|content={{{news_content}}}}}|}}
+
    <!-- Featured: render only if explicit content OR /Body exists -->
 +
     {{#if:{{{featured_content|}}}
 +
      | {{SectionTemplate|title={{{featured_title|Featured}}}|content={{{featured_content}}}}}
 +
      | {{#ifexist:{{FULLPAGENAME}}/Body
 +
          | {{SectionTemplate|title={{{featured_title|Featured}}}|content={{:{{FULLPAGENAME}}/Body}} }}
 +
        }}
 +
    }}<nowiki/><!--trim-->
 +
 
 +
     {{#if:{{{news_content|}}}|{{SectionTemplate|title={{{news_title|News}}}|content={{{news_content}}}}}|}}<nowiki/><!--trim-->
 
   </div>
 
   </div>
  

Revision as of 19:51, 18 September 2025


 
       Create body
     

Navigation menu