Rather than have the new products header on the home page simply say "New Products for the month...etc." I wanted to create a link in the header that would say something to the effect of "New Products...Click Here for Complete List."
The good news...is that I was able to figure out how to do it...but the bad news is that given my limited knowledge of php, etc....I made the change by hard coding the changes into the new_products.php file. So I am wondering if someone could help me modify this so that I accomplish the same thing...but without the hard coding.
First....here is the original portion of new_products.php that I addressed:
Then here is what I did to accomplish the change for the header to make it a link.Code:$title = '<h2 class="centerBoxHeading">' . sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')) . ($category_title != '' ? ' - ' . $category_title : '' ) . '</h2>'; } else { $title = '<h2 class="centerBoxHeading">' . sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')) . '</h2>'; }
While this does what I want...it eliminates the reference to TABLE_HEADING_NEW_PRODUCTS and hard codes in the actual link to the new products page...things that I would like to avoid of course in case of future changes that I might want to make.Code:$title = '<h2 class="centerBoxHeading">' . '<a href="http://www.mywebsite.com/index.php?main_page=products_new" >Featured New Listings...Click Here for Complete List</a>' . ($category_title != '' ? ' - ' . $category_title : '' ) . '</h2>'; } else { $title = '<h2 class="centerBoxHeading">' . '<a href="http://www.mywebsite.com/index.php?main_page=products_new" >Featured New Listings...Click Here for Complete List</a>' . '</h2>'; }



