#

News
Keep your users informed about your company happenings or press releases
with the News Desk.
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
- Have a Solodev CMS.
- Have a Website.
Note:
For step-by-step instructions on adding a Module in your CMS, please visit Add a Module.
#
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.
- Navigate to Modules
- In your CMS dashboard, click Modules in the left navigation menu
- Click the Add Module button
- 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.
Note:
The news module comes with a pre-configured entry that you can customize by accessing the module entry.
Navigate to
web files > content
and create a new file.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>
Important!
You need to add the ID number of your news module to the repeater shortcode within the id=""
attribute.
Create a page in your news folder and name it
index.stml
.Insert your news repeater file into the page you just created.
Note:
To learn more about shortcodes and how they work, visit our shortcodes documentation.
Create a file in your preferred location.
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>
Insert your news detail file into the page you want to display the entries on.
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
Important!
If you already have entries added to your module, you will need to resave them to generate the path. To do this, go to Modify, scroll to Advanced, check the Resave All Entries option., and then click Submit
Click Add Entry to begin adding content to your module
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.