Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: How to exclude category from the url?  (Read 3199 times)

dlcmh

  • Newbie
  • *
  • Karma: 0
  • Posts: 3
How to exclude category from the url?
« on: December 10, 2006, 09:52:21 am »

Let's say I have a site: http://www.whatever.com
I have a Ferrari category, and an article History of Ferrari.

The URL generated by sNews for the article would be:
http://www.whatever.com/ferrari/history-of-ferrari/

My question is, would it be possible to have the URL formed without the category, ie:
http://www.whatever.com/history-of-ferrari/

Thanks for any help!
Logged

Mika

  • Hero Member
  • *****
  • Karma: 9
  • Posts: 1377
    • http://www.ni5ni6.com/
How to exclude category from the url?
« Reply #1 on: December 10, 2006, 10:30:51 am »

Welcome dlcmh :)

Short answer: ;)
No...
Long answer:
... not without some intensive code juggling and fiddling.

You see, all articles are categorized, and category inside URL is needed to pass its variable to apropriate article. However, this could be done differently; say
Quote
http:/domain/category-article/
instead of
Quote
http:/domain/category/article/
but you* need to get your hands dirty if you want to achieve that.

___________
* or someone else if you're not familiar with PHP
Logged
http://www.ni5ni6.com/ - Tutorials, Mods and How-To's about sNews CMS
sNews 1.6 Developers Edition - commented sNews 1.6 version

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
How to exclude category from the url?
« Reply #2 on: December 10, 2006, 11:08:42 am »

count me out... ;)
Logged
Of all the things I have lost, it is my mind that I miss the most.

Mika

  • Hero Member
  • *****
  • Karma: 9
  • Posts: 1377
    • http://www.ni5ni6.com/
How to exclude category from the url?
« Reply #3 on: December 10, 2006, 12:53:31 pm »

Oh no, it's not that hard, phil ;)... just time consuming...
Logged
http://www.ni5ni6.com/ - Tutorials, Mods and How-To's about sNews CMS
sNews 1.6 Developers Edition - commented sNews 1.6 version

dlcmh

  • Newbie
  • *
  • Karma: 0
  • Posts: 3
How to exclude category from the url?
« Reply #4 on: December 10, 2006, 02:46:24 pm »

Guys - thanks for the quick reply, and I have to apologize because I hadn't introduced myself properly.

I find sNews to be totally SUPERB for my needs, because I often find myself stripping down Wordpress to this level of "simplicity", and then having to activate plugins for simple features such as breadcrumbs.

I'll see if I can get my hands dirty with this, because sNews allows me to create 5 - 20 page content sites in the fastest possible way, and the ability to omit the category from the URL will def. make the Snews prog. 10/10 (now at 9/10 :-) ) for me.
Logged

Luka

  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 36
  • Posts: 1717
    • http://www.snewscms.com
How to exclude category from the url?
« Reply #5 on: December 10, 2006, 03:19:40 pm »

Sure it's possible, but why would you want to strip the category?
Logged

dlcmh

  • Newbie
  • *
  • Karma: 0
  • Posts: 3
How to exclude category from the url?
« Reply #6 on: December 10, 2006, 03:25:34 pm »

Luka - stripping the category allows me to flexibly move the article into any other category of my choosing in future, without upsetting the search engines' index - I'm a highly disorganized person, and am always shuffling articles about :-)

I set the Permalink in my Wordpress sites the same way - basically domain.tld/article-title.
Logged