| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
There must be an easier way to incorporate static HTML pages | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
![]() The site I am developing has about 20 or more static HTML pages that are maintained by other people. The way I figured to create links to these pages and have those pages also include all of the X-Cart menus and functions and navigation is the following laborious process:
This is a real pain. Is there an easier way? Would it be possible to create a frames page with left, right and top frames that the content would force itself into? Or is that asking for even more trouble? Any ideas? |
|||||||||
#2
|
|||||||
|
|||||||
![]() Yeah there is an easier way
![]() create one PHP file that assigns a value to $main such as "htmlcontent" Then in home_main.tpl create a new if statement for {elseif $main eq "htmlcontent"} have that include one index file similar to the help index file that just calls each file if another variable is set. If you copy help.php as a base and call it something else then copy the help directory in skin1 this will act as your framework. It will then be really easy to add a new page - just put the includes in the index file and create a new template shell for the new html page, add in a couple of language settings, and add a link to the page. hth
__________________
ex x-cart guru ![]() |
|||||||
#3
|
|||||||||
|
|||||||||
![]() Thanks funkydunk - I think I followed what you are saying. I created this file:
customer/content.php which just has these lines in it: Code:
![]() Then my links to the static content look like this example: Code:
Code:
Code:
I tested it and it was working fine, then suddenly after I made a simple change to the aboutus.html file, I now get this error: Quote:
I double-checked permissions and when I try to edit the file online from the debug console link, the aboutus.html page shows up blank in the editing field. I re-uploaded it from my local copy - still no go. ...AND this still seems like a convoluted way of doing this and I am not seeing how then creating a "section" variable for each static page is any less tedious than just using home.php and then setting the $main variable to specify an individual static page in the home_main.tpl - Did I miss something? Or is this just a cleaner way of doing the same thing without cluttering up the home_main.tpl with an endless string of elsif $main strings? Keep in mind, I am a neophyte with PHP and X-Cart, but am fairly good at hacking my way through things and understanding how it works, but the X-Cart app is so split up into so many pieces, it is extremely difficult to keep the big picture in my head ![]() ![]() If it wasn't for this forum and your input specifically, I woulda given up on this product long ago! |
|||||||||
#4
|
|||||||
|
|||||||
![]() Can you do it with the languages holding the html for display then call that into a tpl file using {$lng.txt_my_content}?
__________________
ex x-cart guru ![]() |
|||||||
#5
|
|||||||||
|
|||||||||
![]() When the new version (v3.4.0) comes out it has a feature that makes adding your own pages much easier but youll have to wait a while for that one.
__________________
Looking for a reliable X-cart host ? You wont go wrong with either of these. ![]() ![]() |
|||||||||
#6
|
|||||||||
|
|||||||||
![]() Quote:
Hmmm - you lost me on that one. Your original suggestion seemed fine if I could get it to work again, but I still get the smarty error and am at a loss as to why. A key thing here is that my client who has been doing edits on these static pages cannot be encumbered by any of these technical issues, so I want to make it as seamless as possible for them. |
|||||||||
#7
|
|||||||
|
|||||||
![]() might be some javascript that is causing it in the included page
__________________
ex x-cart guru ![]() |
|||||||
#8
|
|||||||||
|
|||||||||
![]() Turns out it was a permissions issue. The folder permissions for the content had to be set to 777 for some reason.
I finally got a handle on this now. Thanks for your help, fd. |
|||||||||
#9
|
|||||||||
|
|||||||||
![]() Ok - I've got this thing working fine now - content.php that pulls up an index.tpl file where I have to put variables for each static page and then pass content.php?section=whatever from the links to that content. The issue I have now is that some links need to jump to an anchor link on those content pages. Putting this in the index.tpl didn't work (for reasons obvious even to me when I look at it, but I was desparate.
![]() Code:
|
|||||||||
#10
|
|||||||||
|
|||||||||
![]() Quote:
__________________
-Ken X-Cart User / Developer Since April 2003 (Varying versions, multiple client sites, 3.x through 4.4.x) www.pointbweb.com |
|||||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|