Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

splitting long pages into 2 or 3


14steve14

Recommended Posts

Posted

On my site i have some very long pages in the information section.

 

My dumb silly question is.........Is there an easy way to split these pages into maybe two or three pages with a next/previous tag at the bottom?

 

I bet this has been answered before, but i cant find it. I just think some of these pages would look better if they werent so long, and maybe then people would read them.

 

Any help greatly appreciated.

REMEMBER BACKUP, BACKUP AND BACKUP

Posted

osCommerce uses the splitPageResults class - look at how this is used in existing code, eg. /includes/modules/product_listing.php

 

Matti

Posted
osCommerce uses the splitPageResults class - look at how this is used in existing code, eg.  /includes/modules/product_listing.php

 

Matti

 

Not being a programmer, this may as well be wrote in a foreign language. Can anyone be a little more specific.

REMEMBER BACKUP, BACKUP AND BACKUP

Posted
On my site i have some very long pages in the information section. 

 

My dumb silly question is.........Is there an easy way to split these pages into maybe two or three pages with a next/previous tag at the bottom?

 

I bet this has been answered before, but i cant find it.  I just think some of these pages would look better if they werent so long, and maybe then people would read them.

 

Any help greatly appreciated.

 

Create copies of the file that is too long, naming them info1.php, info2.php etc. Same in the includes/languages/english folder. Don't forget to add the enw filenames to the includes/filenames.php file.

 

For linking forward from info1php to info2.php, use this on the bottom of info1.php:

<a href="<?php echo tep_href_link(FILENAME_INFO2); ?>" class="main"><?php echo PREVNEXT_TITLE_NEXT_PAGE; ?></a>

 

linking form info2 back to info1, add this on the bottom of info2.php:

<a href="<?php echo tep_href_link(FILENAME_INFO1); ?>" class="main"><?php echo PREVNEXT_TITLE_PREVIOUS_PAGE; ?></a>

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Posted
Create copies of the file that is too long, naming them info1.php, info2.php etc. Same in the includes/languages/english folder. Don't forget to add the enw filenames to the includes/filenames.php file.

 

For linking forward from info1php to info2.php, use this on the bottom of info1.php:

<a href="<?php echo tep_href_link(FILENAME_INFO2); ?>" class="main"><?php echo PREVNEXT_TITLE_NEXT_PAGE; ?></a>

 

linking form info2 back to info1, add this on the bottom of info2.php:

<a href="<?php echo tep_href_link(FILENAME_INFO1); ?>" class="main"><?php echo PREVNEXT_TITLE_PREVIOUS_PAGE; ?></a>

 

This is a very good way of doing it.

If you want to do it semi-automatically within the product description it gets a little more complicated.

 

You could add your own Page-tags to you product description like {p1}, {p2} etc.

Then in your code you count the number of occurrences of those tags in the description which gives you the number of pages. Then you take the substring between those tags and display that per page with a link to the next and previous.

Treasurer MFC

Posted

Thankx for the help both of you. After a while i got it sorted to show 3 pages, now wish it was 4 but i will get it sorted.

 

Pages also look so much better without so much writing on them.

 

Many thanks

REMEMBER BACKUP, BACKUP AND BACKUP

Archived

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

×
×
  • Create New...