How are resources handled? - Post ID...

User 122279 Photo


Senior Advisor
14,651 posts

A php include is a small 'inline link' to some portion of a website, mainly used for elements that go on every page, like header, footer and nav. You can read about it here: https://www.w3schools.com/php/php_includes.asp.

The files, to which the php includes are to be added normally also have to have the extension .php, but it is possible have html files parse php, just add a line to your .htaccess file, see here: http://www.besthostratings.com/articles … files.html
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 244626 Photo


Registered User
811 posts

That kind of sounds like what a symbol does. What would be the advantage of php include over a symbol ?
Bootstrap 5 CSS Grid.
User 10077 Photo


Senior Advisor
1,096 posts

Twinstream wrote:
Well, now I am curious. What is a PHP include?

PHP is a programming language for web sites. So, for instance, I can create a page (call it datalist.php) and add code that pulls a list of businesses out of database. I then add code that creates the html to display it on the page.

In RSD/RFF/RBB, I can add an html element with one line of code that says:
<?php include('datalist.php'); ?>

I can have that html element on one page or many pages. Wherever it appears, it will add the list of businesses in that spot on the page.

In the same way, you can put this in the header box in the Settings Pane:
<?php include('headerfile.php'); ?>

or footer box in the Settings Pane:
<?php include('footerfile.php'); ?>


Whatever you have in the headerfile.php will display in the <head> and whatever you have in footerfile.php will appear at the very bottom of the page.

One thing you need to know, though, is PHP is a server-side scripting language. That means that it computes everything BEFORE sending it to the browser. Therefore, if you just preview it in your browser on your computer, you will not see the PHP includes (unless you set up your computer to do so). Ideally, you should upload the files to a development section of your hosting account and preview it from there. If you don't have a development section (or haven't set one up), you can upload to and preview it from your live account, but then the public can see it.
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 10077 Photo


Senior Advisor
1,096 posts

Twinstream wrote:
That kind of sounds like what a symbol does. What would be the advantage of php include over a symbol ?

The advantage is that a symbol is a common component (group of elements) displayed in multiple areas of your site. PHP allows you to program various functions such as the one I just posted. It can pull information from a database to be displayed on the page. It can compute values. There are many things it allows you to do beyond just displaying elements.
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 10077 Photo


Senior Advisor
1,096 posts

Inger wrote:
The files, to which the php includes are to be added normally also have to have the extension .php, but it is possible have html files parse php, just add a line to your .htaccess file, see here: http://www.besthostratings.com/articles … files.html

That's true, but I have run into situations where parsing PHP inside the html has caused conflicts. In one instance, a form built with WFB would not email out the notification or confirmation emails because of it. I never found why it conflicted, but I stopped using the .htaccess method after that.

Now, I just rename my extensions after I export from RSD.
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 10077 Photo


Senior Advisor
1,096 posts

Twinstream wrote:
That would serve me fine until I finished any edits, then I can copy and paste to a custom.css or custom.js file, save and import to my resources, link to it in the footer, and free up space for the next customization I may add.

Just a helpful tip I've found. If you are hosting with Coffeecup and using the Publish button to upload your site, then you need to import your js and css files into the resources, because the Publish feature uploads everything from within RSD.

However, if you are hosting elsewhere, exporting from RSD and the FTPing the files to the server, there is no need to import your js and css files. Keep them external so you can work on them at will. Add links to the css and js files in the head box in the Settings Pane. After you upload your exported RSD files, upload the css and js files to the server (but be careful to put them in the same folders that you linked to in the Settings Pane.

The only downside to this method is that if you preview from RSD, you won't necessarily have the effects of the css and js. However, so far, I've never needed them when I preview.
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 244626 Photo


Registered User
811 posts

Yes, I have had my business hosted for 14 years somewhere else so I am FTPing the files. I am just lately struggling with the choice you describe of exporting from Bootstrap Builder the project files to work on the project outside of the designer program. I open the html file in a browser and proceed to make changes to the custom js or css file I am working on and see the changes happen in the browser upon saving those files. It does not make sense to me to have to do it that way. It splits the design process in two.

So I found that its better to just work on the css or js in the head and footer while still being in Bootstrap Builder. And then when things are finalized, I copy that code into a custom css or js file and import it, delete the code in the head or footer and then link to it.

Thats why I would just like a little more room to design custom js or css inside of Bootstrap Builder so everything, html, css, and js can work harmonously together as one. more happiness....:):)
Bootstrap 5 CSS Grid.

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.