Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted (edited)

Hello,

 

I use v1.3 of this wonderful (Information Pages Unlimited) contribution that includes the parent/child feature for the information pages.

 

Unfortunately, the way it's currently constructed is that the breadcrumb doesn't add a child's parent ID's title (if one exists), so we jump from the child directly to the catalog if we want to go back.

 

I tried to add something like

$information_query = tep_db_query("SELECT info_title, description, parent_id FROM " . TABLE_INFORMATION . " WHERE visible='1' AND information_id='" . $info_id . "'");

$information = tep_db_fetch_array($information_query);

// After extracting the parent_id into $parent, I should add an IF to see if $parent has a numeric value (or if it's not NULL) and a query to extract the title of the parent info page and update the breadcrumb. That's what I have so far (not much, ha?):

$parent = stripslashes($information['parent_id']);

$parent_title = ????

$breadcrumb->add($parent_title, tep_href_link(FILENAME_INFORMATION, 'info_id=' . $parent, 'NONSSL'));

//

...

$breadcrumb->add($title, tep_href_link(FILENAME_INFORMATION, 'info_id=' . $HTTP_GET_VARS['info_id'], 'NONSSL'));

before the "regular" breadcrumb insert in the information.php page and update the SQL query to include the parent_id, but I'm not a strong php coder, so it doesn't work (I don't know how to check what happens if the $parent is NULL and how to extract the $parent_title information if one exists).

 

Would anyone care to help me on this?

 

Thanks,

 

David

Edited by dstu

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...