MX Breadcrumbs Forum :: Breadcrumbs and Custom (Nice) URLs

This thread was displayed: 431 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/


View All View Non Threaded Newest first
  • 06-18-2006 00:07:37 GMT +2 pkazmercyk

    Please note: I have reverted to an earlier version of my navigation system, so this post is no longer valid. The revised request has been posted and is at:

    http://www.interaktonline.com/Products/Free-Products/MXBreadcrumbs/Product-Forum/Details/98915/Breadcrumbs+and+Custom+URLs+Revised+Request.html

    category_ctg TABLE
    -------------------------------------------------------
    id_ctg     name_ctg
    -------------------------------------------------------
    1          Jelly Beans
    -------------------------------------------------------
    2          Vanilla Nut Crunch Bar
    -------------------------------------------------------
    etc.

    For my CSS M and my hyperlinks, I pull from the db like this:

    SELECT *, CONCAT(REPLACE(name_ctg, ' ', '-'), '?id_ctg=', id_ctg) AS newurl FROM category_ctg

    This gives me a URL of
    index.php/Vanilla-Nut-Crunch-Bar?id_ctg=2
    (I also pull from the name_ctg field for my page titles and menu names, etc., without the CONCAT() so they read without the '-')

    But, with MX Breadcrumbs I'm limited to the way the php is hard-coded in terms of which fields are included: (id_ctg, id_parent_ctg and name_ctg)

    I can succesfully use the Breadcrumbs "out-of-the-box" and end up with this URL:
    index.php?id_ctg=2
    My code for above looks like this:

    <?php if ($totalRows_Breadcrumbs > 0) { // Show if recordset not empty ?>
    &gt; <a href="index.php?id_ctg=<?php echo $row_Breadcrumbs['id_ctg']; ?>"><?php echo $row_Breadcrumbs['name_ctg']; ?></a>
    <?php } // Show if recordset not empty ?>

    and while it works, it's loading a different URL than all my other menus and links.
    Alternatively, I can include the catgeory_ctg.name_ctg dynamic binding like this:

    <?php do { ?>
    <?php if ($totalRows_Breadcrumbs > 0) { // Show if recordset not empty ?>
    &gt; <a href="<?php echo $row_Breadcrumbs['name_ctg']; ?>?id_ctg=<?php echo $row_Breadcrumbs['id_ctg']; ?>"><?php echo $row_Breadcrumbs['name_ctg']; ?></a>
    <?php } // Show if recordset not empty ?>
    <?php } while ($row_Breadcrumbs = mysql_fetch_assoc($Breadcrumbs)); ?>

    which gives me a URL of:
    index.php/Vanilla%20Nut%20Crunch%20Bar?id_ctg=9

    Since I can't use CONCAT() value within my script and I can't have "%20" in my URLs, I'm trying to find a way of turning my URL into:
    index.php/Vanilla-Nut-Crunch-Bar?id_ctg=2

    Is there a way to include the CONCAT() function in the PHP script that's generating the URL?

    I've also tried using variables in the header to call for a consistent URL, without any luck.

    Thanks in advance!

MX Breadcrumbs 1.8.3
© Adobe Systems Romania. All rights reserved.