I didn't readily find the solution to this problem in the forums, so I figured I'd make it my first contribution. Basically, this little modification will allow all your external and internal links to show up in the Table Of Contents of a specific Chapter in EZ-Pages. My idea for using the EZ-Pages system is to create detailed product pages. In the TOC, I wanted to provide a link that will take the customer to the regular cart section to view either a category or product page to purchase the product. The current program only lists other EZ-Pages with Content, and no external or internal links in the TOC.
This is a simple modification to the following file:
/includes/modules/pages/page/header_php.php
Basically take the $pages_order_query and knock off the line that begins with "AND". That line cuts out the results that have an external or internal link listed.
This is a copy of my code:
// ALTERED QUERY TO INCLUDE ALL LINKS IN TOC - AA - 20080604
// COPY OF ORIGINAL QUERY BELOW
$pages_order_query = "SELECT *
FROM " . TABLE_EZPAGES . "
WHERE ((status_toc = 1 and toc_sort_order <> 0) and toc_chapter= :chapterID )
ORDER BY toc_sort_order, pages_title";
/*
$pages_order_query = "SELECT *
FROM " . TABLE_EZPAGES . "
WHERE ((status_toc = 1 and toc_sort_order <> 0) and toc_chapter= :chapterID )
AND alt_url_external = '' and alt_url = ''
ORDER BY toc_sort_order, pages_title";
*/
If you use this hack with the "Prev / Continue / Next" buttons, you get extra blank pages in there for the internal / external links. I turned the buttons off because I don't want them for navigation anyway.
I hope this helps somebody. I spent a couple hours playing around with the system thinking I was doing something wrong trying to get the links listed in the TOC. It then took me some more time to find the right file to modify. Questions and comments welcome.



