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: [Jason] Adding tags in the url?

Thank you Jason. actually what I mean was that if you visit any news site, the article URL usually reflects the year and month it was created. So for instance, if someone comes to my site, instead of illumemag.com/articleDetail.php?Article-Title-001, the URL would be illumemag.com/2011/06/articleDetail.php?Article-Title-001 to reflect the month and year the article was published.

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/