Plugin

Archived
Forum
(read-only)

DT Plugin

ExpressionEngine 2, ExpressionEngine 3

Back to this add-on's main page
View Other Add-ons From Jerry Price

     

Allowing “//” to be passed to set parameter and still output current time

Feature Request

totalserve
totalserve

Line 116, I recommend modifying:

if ($dt=="")
 
$this->_dt=time();
else 

to:

if ($dt=="" OR $dt=="//")
 
$this->_dt=time();
else 

This will allow “//” to be passed in as a URL segment and still return the current time. For example you have:

{exp:dt format='%D %j %M' set="{segment_1}/{segment_2}/{segment_3}"

Which will obviously work fine for a URL like: http://domain.ext/05/08/2014 however if the URL is simply domain.ext then the set parameter will be passed “//”.

VIM Interactive
# 1
Developer
VIM Interactive

I have added this in the latest release.