How to change url link in Blog module?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
toto
Forum Members
Forum Members
Posts: 29
Joined: Tue Nov 07, 2006 11:38 am

How to change url link in Blog module?

Post by toto »

Hi friends, now all my posts in Blog are shown like:
www.domain.com/Blogs/2/23/post-title

is there a way to be changed to:
www.domain/Blogs/categoryname/post-title?

Just to show category and postname. Please any help?
toto
Forum Members
Forum Members
Posts: 29
Joined: Tue Nov 07, 2006 11:38 am

Re: How to change url link in Blog module?

Post by toto »

Okay im loosing day after day to solve this, please is it possible?

In Blog module im trying to change this lines:
action.showblog.php line 203

Code: Select all

from:
$prettyurl = 'Blogs/'.$dbentry['id'].'/'.$returnid.'/'.strtolower(munge_string_to_url($dbentry['title']));

to:
$prettyurl = 'Blogs/'.$dbentry['title'].'/'.$returnid.'/'.strtolower(munge_string_to_url($dbentry['title']));

and the link is looks like:
www.domain/Blogs/post-title/23/post-title
But the link not work, any suggestions why not work. May be because there is not $dbentry['id'] or...?

Please help
toto
Forum Members
Forum Members
Posts: 29
Joined: Tue Nov 07, 2006 11:38 am

Re: How to change url link in Blog module?

Post by toto »

Is it posible?
JeremyBASS

Re: How to change url link in Blog module?

Post by JeremyBASS »

One thing to remeber is that "23" in the page your on...
www.domain.com/Blogs/2/23/post-title

the "landing page" so ... ***unless Calguy knows better as the author*** the anwser to your question is no... Not yet... and your right on the $dbentry['id'] as far as I see it..

My2Cents
jeremyBass
nuno

Re: How to change url link in Blog module?

Post by nuno »

www.domain/Blogs/categoryname/2/23/post-title
or
www.domain/categoryname/2/23/post-title

is possible,  but,  you must have to .../2/23/..  . This is ID and RETURNID route stuff  ( see RegisterRoute() in Blog.module.php )

if Silmarillion want i can implement this,  but,  i don't know what he think about this and also the others !

Best Regards
Nuno Costa
JeremyBASS

Re: How to change url link in Blog module?

Post by JeremyBASS »

@nuno - why are all the of these mods set that way... with the RETURNID ... Why not just have a text field in the admin side so we can set a landing page? could even have it so it's optional... set it or use RETURNID ... anyways.. I am just unclear if there is a reason for it...

I'd second the

www.domain/Blogs/categoryname/2/23/post-title

taking the blogs out of just numbers would set it up to do more and make adding the blog to the menu system easier... it's a pain to get them in now... to many steps lol...
Last edited by JeremyBASS on Tue Dec 09, 2008 2:54 pm, edited 1 time in total.
toto
Forum Members
Forum Members
Posts: 29
Joined: Tue Nov 07, 2006 11:38 am

Re: How to change url link in Blog module?

Post by toto »

I thing it is possible if you see Vacation module all links are like this:
http://localhost/cmsmadetest/index.php/ ... postalias/

So may be there is a way to have a link in sms modules Blog or News without postID in url, but how to change the module.
Post Reply

Return to “Modules/Add-Ons”