1

Trying to grab the month and year from URL on an archive page (i.e /blog/2017/02) and convert to a date variable and display as such in template "February, 2017." Using EE3.

Open to add-on or out of box code, but not interested in using php in template. Please advise.

1

If you want to keep php out of your template, but still be able to use php string manipulation you could use CE String to do so. http://docs.causingeffect.com/expressionengine/ce-string/index.html

This will allow you to use datetime conversion without directly writing out php code as well as any other php that you might need. Its pretty powerful.

I'm sure that there are other extensions and plugins that could handle datetime as well - perhaps Low Nice Date? http://gotolow.com/addons/low-nice-date

Otherwise, it would be easy enough to do in jquery on page load as well.

edit: after looking at a few other plugins, I think Low Nice Date is the way to go. Its simple, free, and works for EE2 and EE3.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.