Jump to content

Broken custom seo trick after 7.2


Recommended Posts

Hi guys, before 7.2 i was able to have my second language (spanish) KB articles organized with an "/espanol" word in the url's, now as the url construction was replaced with the "routepath" function im not able to do this, any idea how to fix/do this?

 

Previously i had the following in the, for example, knowledgebase.tpl

 

<a href="{if $seofriendlyurls}{$WEB_ROOT}/knowledgebase/{if $LANG.locale eq 'es_ES'}espanol/{/if}{$kbcat.id}/{$kbcat.urlfriendlyname}{else}knowledgebase.php?action=displaycat&catid={$kbcat.id}{/if}">

 

but now with

 

<a href="{routePath('knowledgebase-category-view', {$kbcat.id}, {$kbcat.urlfriendlyname})}">

 

i dont know where to put that IF statement.

 

Thanx n advance!

Link to comment
Share on other sites

you might have to do it before and if spanish, assign a new variable in Smarty to add /espanol/ to {$kbcat.id} and use that in routePath in place of {$kbcat.id}.

 

although what i'd try first would be to hardcode a string to replace $kbcat.id in routePath, to see if the idea would work or whether WHMCS ignores it... if it works, then you can fix it in Smarty/hook... if it doesn't, then it might need a htaccess tweak or perhaps not worth the effort. :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated