#

News Icon

News

Keep your users informed about your company happenings or press releases
with the News Desk.

DOWNLOAD

Keep your users informed about your company happenings or press releases with the News Desk. Complete with categories, the News Desk can be used in multiple locations throughout your website.

# Prerequisites

# Step-by-Step Setup Guide

These steps will guide you through the process of installing the News Module and getting it live on your page.

  1. Navigate to Modules
  • In your CMS dashboard, click Modules in the left navigation menu
  • Click the Add Module button
  1. Add the module
  • Give your news module a name
  • Select from the three options:
    • Datatable: Creates a simple data table structure
    • Module: Builds a custom module from scratch
    • Package: Installs a pre-built module from a zip file
  • For the purpose of this tutorial, select Package: and use this zip file .
  • Click Submit.
  1. Navigate to web files > content and create a new file.

  2. Add the calendar HTML code using the example template provided below.

<div class="container">
  <h1 class="text-center">News</h1>
  <div class="mt-5">
    <div class="row border-lg-bottom py-4">
      [repeater id="" order="start_time desc" limit="0, 4" display_type="news"]
        <div class="col-lg-3">
          [is_set value="{{news_image}}"]	
            <img alt="{{event_title}}" src="[get_asset_file_url id='{{news_image}}']" class="img-fluid img-thumbnail">
          [/is_set]
          [is_empty value="{{news_image}}"]
            <img alt="{{event_title}}" class="img-fluid img-thumbnail" src="/_/images/default-2.jpg" />
          [/is_empty]
        </div>
        <div class="col-lg-9 ps-lg-3 mt-4 mt-lg-0">
          <h2><a aria-label="Read more" href="{{path}}">{{event_title}}</a></h2>
          <p class="text-muted fs-6">[print_date format="M. d, Y g:i a" timestamp="{{start_time}}"]</p>
          <p>{{news_intro}}</p>
          <p><a aria-label="Read more" href="{{path}}"><strong>Read More</strong></a></p>
        </div>
      [/repeater]
    </div>
  </div>
</div>
  1. Create a page in your news folder and name it index.stml.

  2. Insert your news repeater file into the page you just created.

  1. Create a file in your preferred location.

  2. Add the HTML code for your news list layout using the example code provided

<div class="container">
  [entry]
    <article class="row justify-content-between mt-3">
      <div class="col-md-7">
        <h2 class="border-bottom border-primary border-2 mt-2">Upcoming news</h2>
        <div class="mt-4 pe-7">
          <p>{{news_content}}</p>
        </div>
    </article>
  [/entry]
</div>
  1. Insert your news detail file into the page you want to display the entries on.

  2. Map your Module to your page:

  • In your Module, click Modify
  • Under Websites Properties
    • On Detail Page Template, select the .stml file for your detail page
    • Under Detail Folder Location, select the folder where your detail file is located
  • Click Submit
  1. Click Add Entry to begin adding content to your module

  2. Go to your website and refresh the page to see your news module in action

# Support

Support for News Module is handled directly through Solodev's global help desk. For more information regarding support queries, go to www.solodev.com.