MX Breadcrumbs Forum :: Breadcrumbs and Custom URLs Revised Request
This thread was displayed: 453 times
Starting with 17th May 2007, Adobe Systems will stop offering support for any version of the discontinued InterAKT products. As a result, we will not answer to new support incidents starting with May 17th, 2007. Pending support incidents will still be followed in order to be closed. The product forums will remain open and be transformed in user-to-user forums. The general forums will be made read-only and not allow new posts or comments.
For more information about the affected products visit: www.interaktonline.com/Support/
pkazmercyk
06-18-2006 18:38:08 GMT +2
|
Please note: My original post at: http://www.interaktonline.com/Products/Free-Products/MXBreadcrumbs/Product-Forum/Details/98902/Breadcrumbs+and+Custom+%28Nice%29+URLs.html
has been changed to this one. Please disregard the older post above.
Using MX Breadcrumbs, I need to do two things
(both explained in detail below):
1. Either use CONCAT() in a query, or figure out how to use str_replace in the PHP script to replace spaces (or %20) with hyphens (-) for the category name (name_ctg). (Or modify the breadcrumbs/recordset.inc.php file). Please see details below.
2. Make the id_parent_ctg value available to my PHP echo script. (Or modify the breadcrumbs/recordset.inc.php file). Please see details below. I'll explain:
The site is constructed to include friendly URLS, so all pages are loaded into index.php with MX Includes by PK of their category, I've used CONCAT() and REPLACE() in advanced recordsets, along with Server-Side Includes (from List or Table) to generate my URLS.
My db is setup with self-foreign keys to establish parent child relationships.
Example category_ctg TABLE ------------------------------------------------------- id_ctg id_parent_ctg name_ctg ------------------------------------------------------- 20 0 (or NULL) American Lakes ------------------------------------------------------- 30 20 The Great Lakes ------------------------------------------------------- 37 30 Lake Erie ------------------------------------------------------- 38 30 Lake Superior ------------------------------------------------------- etc.
I have found the best way to navigate my site and have "nice" URLs is to pull the name_ctg from my database using MX Includes, so the using the above example,
CSS Menu2 (Solved) For my CSS Menu and my hyperlinks, I pull from the db like this: Query: SELECT *, CONCAT(REPLACE(name_ctg, ' ', '-'), '?id_ctg=', id_ctg, '&id_parent_ctg=', id_parent_ctg) AS newurl FROM category_ctg Resulting Examples: index.php/The-Great-Lakes?id_ctg=30&id_parent_ctg=20 index.php/Lake-Erie?i
View full message
|
|
|
Magda NEAGU[InterAKT]
06-19-2006 10:38:59 GMT +2
|
Hi Paul,
I am sorry but at the moment our custom development department is fully booked until the end of August, and we cannot accept any more projects, as we do not have the available resources to handle them.
Depending on the emergency of your project, I would suggest to wait until the beginning of September and then contact us again. I am sure we will be able to handle this project then.
I do apologize for not being able to offer you a proper resolution for this problem. If there is anything else I can do for you let me know.
Magda
|
|
|
pkazmercyk
06-19-2006 14:22:36 GMT +2
|
Thanks for getting back to me. If there's anyone else who can point me in the right direction, it would be a huge help to me.
|
|
|
pkazmercyk
06-19-2006 16:29:25 GMT +2
|
With a little help, I was able to solve one of the two problems. Here's the solution to replacing spaces (%20) with "-": <?php $string = str_replace(' ', '-', $row_Breadcrumbs['name_ctg']); echo $string; ?> Now, if I can just figure out how to "grab" and use the id_parent_ctg, I'll be ready to rock!
|
|
|
pkazmercyk
06-19-2006 19:08:40 GMT +2
|
Solved!!! The key to adding the id_parent_ctg to the available variables (for me, anyway) is: 1. modifying the includes/breadcrumbs/recordset.inc.php file to add the $fk variable into the temporary table, etc.
2. saving includes/breadcrumbs/recordset.inc.php under a different name (if I make changes to the original file, and save it, it reverts to the original code)... 3. redirecting the "require once" path to the new file in the head of the page. WOW!!!!!!!!!!!
|
|
|
Fred at ExelWebs.com
10-02-2010 17:05:44 GMT +2
|
Hi pkazmercyk,
Do you still have this extension?
Since it was a free download I would like to add it to the Friends Of Interakt website for download.
|
|
|
|
|