Page 1 of 1

CGBlog URL Template Issue

Posted: Mon Mar 06, 2017 3:27 pm
by ColonelBlimp
Hi,

I have the following:
CMSMS 2.1.6
CGBlog 1.14.2
CGExtensions 1.53.19
CGSimpleSmarty 2.1.6
JQueryTools 1.3.9
Apache 2.4 with mod_rewrite

The CGBlog seems to run okay, but the urls do not conform to the URL Template pattern. For example, I have:

Code: Select all

[TLD]/blog/2/1/Heavy-Rains-Brings-Another-Colony.html
but wanted:

Code: Select all

[TLD]/blog/2017/01/Heavy-Rains-Brings-Another-Colony.html
The defined pattern is the default:

Code: Select all

{$postdate|cms_date_format:'%Y'}/{$postdate|cms_date_format:'%m'}/{$title}
Any pointers as to what the issue might be?

Many thanks.

Re: CGBlog URL Template Issue

Posted: Mon Mar 06, 2017 4:30 pm
by calguy1000
The URL template is used to initially populate the 'URL' slug (suffix) field in CGBlog. And only when initially entering an article or when explicitly requested.

The idea is you can specify whatever URL slug (suffix) you want, and we can use the 'template' to come up with an intelligent suggestion.

The <prefix>/<pageid>/<articleid>/<string> pattern is used IF the url slug is empty.

For existing articles (if the URL field is empty) clicking in that field should display (via ajax and autocomplete) a suggested url slug... or you can enter your own.

Re: CGBlog URL Template Issue

Posted: Mon Mar 06, 2017 4:47 pm
by ColonelBlimp
Many thanks for the quick and useful answer. Although the AJAX does not work, I added the suffix I wanted (minus the leading '/') and all is good.

Your coding efforts are appreciated.