Adding tags in the url?

4 posts by 2 authors in: Forums > CMS Builder
Last Post: June 18, 2011   (RSS)

How can we add tags.. ie: year & month in the article link and have it update automatically each month? are there special tags we can use?

domain.com/2011/06/articleDetail.php

Re: [Illume Magazine] Adding tags in the url?

By Jason - June 17, 2011

Hi,

If you mean just getting the current year and month, you can do this:

<?php
$year = date("Y");
$month = date("m");
?>


You can then use this text anywhere you want.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Illume Magazine] Adding tags in the url?

By Jason - June 18, 2011

Hi,

Okay, to get the year and month of article, you could do something like this:

<?php
$year = date("Y", strtotime($article['createdDate']);
$month = date("m", strtotime($article['createdDate']);
?>


in terms of the format of your URL, I think the closest you would get to that would be like this:
illumemag.com/articleDetail.php/2011/06/Article-Title-001

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/