Displaying Publishing/Effective Dates

To display the date that your page is published or effective, you will simply follow the steps in this tutorial. This will be particularly useful for news items or any pages that you want to display the published date on.

  1. Go to the folder that contains the pages you wish to display published dates on 
  2. Click on Contents in the green navigation bar 
    content
  3. Click on the green button that says Add, edit, or remove a portlet below the content title 
  4. Click the Add portlet... drop-down bar and select "static text portlet
    static text portlet
  5. Click on the HTML icon 
    HTML icon
     
  6. Paste the code below into the HTML Source Editor and click Update
    <script type="text/javascript">
    	$(document).ready(function() {
    		var date = $('meta[name="DC.date.valid_range"]').attr('content'),
    			re = /^(\d{4})\/(\d{1,2})\/(\d{2})/,
    			months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
    			m, d, y,
    			newDate;
    	
    		date = re.exec(date);
    		m = months[ parseInt(date[2]) - 1 ];
    		d = date[3].replace(/^0/,'');
    		y = date[1];
    		newDate = m + ' ' + d + ', ' + y;
    				
    		$('article header').append('<p aria-label="Date Published">' + newDate + '</p>');
    	});
    </script>
     
  7. Check the Omit portlet border box and Save. 
       omit portlet