-
1. Re: Editing PHP Includes in Design View
Nancy O. Mar 13, 2011 12:58 PM (in response to Shan-Dysigns)HTML pages do not typically parse data on the server (unless you have made special provisions for this with your host.).
In most cases, for server-side includes to work, the parent page (page1.htm) would need to be named page1.shtml or page1.shtm or page1.php.
Include files can be named anything you wish (include.foo). But if you want to edit them in design view, use an .htm or .html extension (include.htm).
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/
http://twitter.com/altweb -
2. Re: Editing PHP Includes in Design View
Shan-Dysigns Mar 13, 2011 1:26 PM (in response to Nancy O.)But if you want to edit them in design view, use an .htm or .html extension (include.htm).
My included file is named "page1.htm" - this is not the main html document - when you mentioned the parent page as "page1.htm", that threw me off. The parent page is "main.php", correct?
Here is what I'm trying to accomplish (which I'm sure is not the most orthodoxed way):
I will have several shopping cart itmes on a page - each item will have quite a bit of code for drop down menu options (for customizing the product) - instead of having a ton of code on the main page, I was trying to find a way in which I could make a separate document for each item and only need one line of code (per item) in the main document in order to insert. Each page would basically be a form object with some encrypted PayPal code. Am I attemping something that won't work? My main goal is to be able to edit the included file in Design View. If you saying that's possible, can you please set up a simple test for me in which the main file would have an include to an external document with (let's say a textfield object)? I would like to be able to click that textfield object while in Design View and have that particular code be highlighted in "code view".
-
3. Re: Editing PHP Includes in Design View
Nancy O. Mar 15, 2011 2:02 PM (in response to Shan-Dysigns)Includes are mainly used for snippets of re-usable code that appears throughout your site. Some examples would be common headers, menus, ads & footers that may require changing from time to time. By keeping them in include files, you can update an entire site by editing and re-publishing 1 or 2 files instead of every page in the site.
For shopping cart sites, it is often better to store product data in a server-side database and insert PHP code to bring the data into cart pages. Dynamic sites typically have only a few static pages. All the heavy lifting is performed by the server. If you're new to shopping cart sites, look at Cartweaver or Web Assist.
Cartweaver
Web Assist eCommerce Options
http://www.webassist.com/support/ecommerce-options.php
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/
http://twitter.com/altweb



