Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to Add pages


Karlin

Recommended Posts

I would like to add pages to my link directory file (it is categorized by a different program, and writes PHP pages). I followed the contribution for adding pages, but it puts a link on the Home page, which I do not want to appear (ie. no link for the individual Link categories).

 

My goal is to have the user go to the Link Directory page, then be able to choose any of the available categories there while maintaining the osC look and feel. I approximated this using html pages, but then I could only go back to the Links Page (HTML format, not PHP), or the Home page. The problem is that the left and right columns are not available. What files do I need to modify to have both columns available in all of the Links categories pages?

 

You can go here to have a look:

http://www.karlin.com

 

Anyone know how to do this?

Link to comment
Share on other sites

I would do this by copying the links index page that you have already created and including the content from the subcategory pages with the PHP Require command. You will have to remove the heading from the included pages first, so you will need a slight modification to the code that generates these pages. Shouldn't be that hard to do.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

I would do this by copying the links index page that you have already created and including the content from the subcategory pages with the PHP Require command.

 

OK, that sounds great, but could you give very specific instructions how to do this? I looked in the index.php file, and the /includes/languages/english/link.php. It appears that both files are read by the browser to create the page. So I have no idea which file to edit, or where to edit it.

 

You will have to remove the heading from the included pages first, so you will need a slight modification to the code that generates these pages. Shouldn't be that hard to do.

Yes, that was definitely easy! :)

Link to comment
Share on other sites

Ok, let's try it this way. Start with a simple page that has only text content, say conditions.php. Copy that and name the copy links_gifts.php. It should go in your catalog directory, same as the original conditions.php.

 

Now look near the bottom of that file for this line:

        <td class="main"><?php echo TEXT_INFORMATION; ?></td>

and change it to:

        <td class="main"><?php require('links/gifts.php'); ?></td>

If you can strip all of the extra code out of gifts.php then it will display in the middle of the new page. Do this for each of your links files and you're there.

 

We could get fancier with dynamic includes etc, but this is simple and does the job.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

  • 5 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...