Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Displaying Module based on Date rangeDisplaying Module based on Date range
Previous
 
Next
New Post
4/3/2018 8:34 PM
 
Hi all. 

I have the need to be able to control the visibility of a number of modules within a site based on Date ranges, and would like to automate the process vs manually updating the date range in the module settings. 

I.e. have a module that is visible the FIRST week of every month, another the SECOND week and so on...

Or, have a module that is visible every week except Monday from 9am - 11am.

I don't want to manually have to update module settings each week. 

Is there a way to do this easily? Or a module management tool that might provide a tool set?

Help appreciated. 


for info on our website DNN skinning, feel free to check out our website at: www.spwd.co.nz
 
New Post
4/4/2018 7:09 PM
 

Hello!

You have a few options here, I am sure there are more I am forgetting...

  1. Scheduler: You can use the dnn scheduler to create a scheduled process to make certain modules visible on certain days
  2. Page Theme: You can do a page theme with panes for each week of the month. Make it so they are always are visible when in edit mode or visible if their specific week is visible
    https://stackoverflow.com/questions/2... has a good extension method to provide your conditional script tag with the desired functionality:
    <%  If (DotNetNuke.Common.Globals.IsEditMode() || DateTime.Now.GetWeekOfMonth() == DesiredWeekNumber)  Then %>
    <div id="DesiredWeekNumberPane" class="SomeClass" runat="server"></div>
    <div class="dnnClear"></div>
    <% End IF %> 

Number 2 would be my preferred method.

Hope it helps :)

 

 

 

 
New Post
4/6/2018 3:24 AM
 

Thanks Chad, 

that's a great solution to look into for the main content.

One other question for everyone, I'm looking to setup an event countdown, which I want to stop during a weekly event, then countdown to the next event, which might be later in the week, and to cater to recurring events.  Is the suggestion above going to do that? Or is anyone aware of a countdown module that caters to recurring events?  My searched haven't found anything (other than joomla options)... Be really grateful if someone had some thoughts around how to tackle this (note, I'd like to be able to cater to the possibility of having multiple events on the same day. I'm assuming this could be achieved using multiple instances of a countdown module, then implementing the theme suggestion above, however would prefer to just be able to set this up within the module itself). 


for info on our website DNN skinning, feel free to check out our website at: www.spwd.co.nz
 
New Post
4/27/2018 8:39 PM
 

Sorry for the slow reply... I dont see these notifications so it requires that I manually go back and check...

Anyhow: I would, in your theme that have customized weekly events add a <div id='eventTimer'></div> element and based upon container visibility... as suggested in my post above... extend the functionality to, on page load(in javascript),  start a timer that is based upon a passed end date...

Your code could look something like this: https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_countdown

:)

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Displaying Module based on Date rangeDisplaying Module based on Date range


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out