Pretty URL's for News Category Browse Links?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Pretty URL's for News Category Browse Links?

Post by Dr.CSS »

This "http://localhost/cmsms/news/2/66/My-Pretty-Page.html is actually what is know as a pretty URL for news...

No you don't have a folder called news, CMSMS doesn't make 'pages' that are in folders, all 'pages' are in the DB
ladyr0gue
Forum Members
Forum Members
Posts: 91
Joined: Fri Feb 17, 2012 4:25 pm

Re: Pretty URL's for News Category Browse Links?

Post by ladyr0gue »

Dr.CSS wrote:This "http://localhost/cmsms/news/2/66/My-Pretty-Page.html is actually what is know as a pretty URL for news...

No you don't have a folder called news, CMSMS doesn't make 'pages' that are in folders, all 'pages' are in the DB
Hey Mr. Dr.... thanks 4 replying - yes that is a very pretty url as far as I'm concerned - it was when I clicked on categories in the summary view I was kinda wishing for a nice "http://localhost/cmsms/news/general/ or general.html instead of the unpretty "http://localhost/cmsms/index.php?mact=N ... eturnid=66 - having spent about a week trying each and every suggestion I could find in the forums I finally have my answer - it ain't gna happen... http://forum.cmsmadesimple.org/viewtopi ... 6&p=277737
calguy1000 wrote:There is no code in the News module to handle any category urls in this way.

So even if you can... ...manage to get the links to appear properly, news will not handle them.
http://forum.cmsmadesimple.org/viewtopi ... 20&t=37978
calguy1000 wrote:Once you add parameters like sort order, sorting field, page number, page limit, summary template, detail template (and other parameters that the news and other various modules support for customizing the output) to the url, no matter what you do, it won't be pretty. and besides, usually it's the detail view that's most important anyways... users don't generally care about how ugly the url is to access "the 4th page of all news articles (even expired ones) sorted by author in decending order with 5 items per page", using a different detail template.

News allows you numerous ways to organize the data, just by adding more calls to the module. Making the pagination urls 'pretty' would require removing that flexibility.
the only reason i tried making a subfolder called news was because I also tried what it said here http://wiki.cmsmadesimple.org/index.php ... stallation
For NEWS-Module I had to create a subfolder /news and add a /news/.htaccess:

Code: Select all

Options +FollowSymLinks
RewriteEngine on
RewriteBase / 
# Rewrite for NEWS
# requested URL looks like /news/12/13.html rewrite is 
# index.php?mact=News,cntnt01,detail,0&cntnt01articleid=12&cntnt01returnid=13
# first number is article, second is returnid; NC = nocase, L=last (rule)
RewriteRule ^([0-9]*).html$ index.php?mact=News,cntnt01,detail,0&cntnt01articleid=$1 [NC,L]
RewriteRule ^([0-9]*)/([0-9]*).html$ index.php?mact=News,cntnt01,detail,0&cntnt01articleid=$1&
                                                                             cntnt01returnid=$2 [NC,L]
One line for the rule!!
humph. am going away to sulk now :)
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Pretty URL's for News Category Browse Links?

Post by Dr.CSS »

Have you set a default detail page in News admin?...
ladyr0gue
Forum Members
Forum Members
Posts: 91
Joined: Fri Feb 17, 2012 4:25 pm

Re: Pretty URL's for News Category Browse Links?

Post by ladyr0gue »

Dr.CSS wrote:Have you set a default detail page in News admin?...
yes, news page. the detail view was perfect, it was just category view.
swarfega
Forum Members
Forum Members
Posts: 174
Joined: Mon Sep 06, 2010 10:51 am

Re: Pretty URL's for News Category Browse Links?

Post by swarfega »

Apologies for opening this thread again but I would like to know if the news post url has changed in some way in version 1.11.

I currently use index.php?mact=News,cntnt01,default,0&cntnt01detailpage=59&cntnt01category_id=$1&cntnt01returnid=59.
Post Reply

Return to “Modules/Add-Ons”