Headers and Footers

User 476372 Photo


Registered User
196 posts

Hi,

Is there a way to create a header and footer in RSD so that you have one file for each and you can just call it on every page? It makes updating a site MUCH faster. For example, if a client need to change a phone number and it is at the top of every page of your site. If you have a master header file, you just have to change it once and it changes through out the whole site.

Thanks! :)
SPOON FROG graphics - Affordable Web Site Design & Ecommerce Design
www.spoonfroggraphics.com
User 103173 Photo


VP of Software Development
0 posts

Not currently, but stay tuned for some exciting announcements on RSD in the upcoming weeks. ;)
Learn the essentials with these quick tips for Responsive Site Designer, Responsive Email Designer, Foundation Framer, and the new Bootstrap Builder. You'll be making awesome, code-free responsive websites and newsletters like a boss.
User 476372 Photo


Registered User
196 posts

Okie dokie, thanks! I can't wait! :)
SPOON FROG graphics - Affordable Web Site Design & Ecommerce Design
www.spoonfroggraphics.com
User 2811300 Photo


Registered User
4 posts

Scott,
I am also interested in the same as that is very important to me. I imagine when you do the same will be true of the header and navigation. Almost temped to wait as I have sites to develop now and am spending quite a bit of time trying to learn RSD but the development time is considerable without these features. Have not tried yet but what about exporting the site then editing the HTML code to utilize php calls to do this?

Dan
User 2817183 Photo


Registered User
1 post

This would be very helpful as we are required to have a legal disclaimer at the bottom of each page.
User 425371 Photo


Registered User
15 posts

Hello,

Hope this feature will be available soon.

Regards,
Nig.
User 2846070 Photo


Registered User
1 post

Hi there

Is this now possible i see these posts are a while back so hopefully this is there now. Im a new user and want to get this bit straight before doing many pages on my project
User 10077 Photo


Senior Advisor
1,096 posts

Until CC has a chance to implement this in RSD, there is a workaround if you are hosting on your own server (not CC).

1. Configure your hosting to parse php inside an html page. This involves change the .htaccess file. You will need to check with your web host for how to do it on your server.

2. Create index that has the header and footer.

3. Go to Manage Project and make a duplicate of that page. Call the duplicate: styles

4. On index, in the column that holds all your header elements, remove all the elements. Add an HTML Element in that column. For the HTML Element code, add:
<?php include('header.php'); ?>

5. On index, do the same with the footer column. Remove the element. Add an HTML Element in that column. For the code there, add:
<?php include('footer.php'); ?>

6. Export your site and open in your favorite HTML editor.

7. Create two new pages. Call one header.php and the other footer.php

8. Open styles.html. Copy all the html from the header column into header.php. Copy all the html from the footer column into footer.php

9. Upload your site to your server and open index.html in your browser. If everything was done correctly, index.html should show your header and footer correctly.

10. Now you can create new pages and just include the HTML Element for the header and footer with that same one line.

If you need to make a change to the header or footer, make it on styles.html. When you export the site, just recopy the html from styles.html to header.php or footer.php (wherever you made the changes). Upload header.php and/or footer.php, and the change appears on every page.
ASK ME ANYTHING
I provide personalized help for Coffeecup Users including personal or group training for Site Designer, Web Form Builder and more via Zoom.
Email me at support@uscni.org or call 865-687-7698.

Did you know that Web Form Builder can be used for both simple and complicated forms and that it's not limited to the default fonts and buttons? Take a look at a form we developed for WindowTinting.com.
https://forms.windowtinting.com/forms/w … ppingcart/
User 1899738 Photo


Registered User
1 post

Geezer wrote:
Hi there

Is this now possible i see these posts are a while back so hopefully this is there now. Im a new user and want to get this bit straight before doing many pages on my project


I was wondering this as well
User 2843676 Photo


Registered User
11 posts

Brians system will work (I've used it), but remember, this is a 'Work-a-Round' to avoid renaming your files from .html to .php. .php files will not process when trying to view in RSD.
My Auto dealer software I designed over 10 yrs ago (and is still in use by 100's of auto/RV and Boat dealers) is a mysql db driven php software that creates dynamic pages using php includes as well as php echo calls. I'm in process of redoing software using RSD to use Responsive templates instead of the original 4 static templates that are WAY outdated! Original templates were 'Old School' using tables etc.. Hey.. it worked at the time :)

From my experience, I would think twice about including a full header include file and statement. Reason is if you include the full header, say from your index.html file, all your pages will have the same info like title, meta tags, etc. There IS a work-around but I'm not going into it here. The footer should not be a problem even if you are adding Google Analytics Tracking Code here. You could also use include statements to pull in your menu. If your menu was contained in say menu.php or top-menu.php etc, you would only need to update this file to make changes across whole site.

Remember, you will only be able to view the results on your live server unless you have installed wampserver on your windows machine. Wampserver allows you to run your own apache server on your local windows computer. You can set up which V of apache, php and mysql you wish to run. This is what I use for building and testing sites before uploading to live server.

Here's the code you should place into your root or higher .htaccess file IF you have ftp access to your server.
AddHandler application/x-httpd-php5 .html .php .htm

Run a php check on your server first to see which V of php you are running.
This will also work for those building sites using wampserver.

To test, create a sample.html file and place the following into it then upload to your server.
<?php
echo "My first PHP script!";
?>

If all works, you should see the My first PHP script! text.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.