PHP

Will Bootstrap Studio ever support PHP?

I highly doubt as devs have said you can do this with custom code component but they won't fully sport it as got more important things to focus on

So that means after I export I'll have to replace the html extension with php and test it? such a hastle.

Yeah it is a hassle, but I guess something that could happen in time.

I too am wanting it supported for Wordpress theme development, but having to work around it for now is fine.

I think this is a must have. PHP is so popular now!

PHP support is a complex feature that is best left for IDEs. But we came up with an interesting idea in another thread. We can create an option in the upcoming Export dialog, which will enable you to rename all your pages when they are exported. Do you think this will make your work easier?

So custom code with the option to then change extension during export.

I think that would work ?

Sounds good in principle, let's give it a try :-)

Will the export dialog be able to set the extension per file? Will it remember these for subsequent exports?

Yes, extensions will be set by file and the setting will be saved.

I have a js function for contact forms. I have some hidden inputs as params like success, incomplete and error message, from and to ...etc. So everything is in html or js. But I have the PHP file where the email is send. It would be nice to add the php file (not edit) in a folder so it export all together instead of adding it after export everytime. Just place it in the project.

BTW: Awesome work with the publish tool!

Another potential solution is to disregard the file extension - .html, .htm, .php - it shouldn't matter.

It's really up to developers configuring their web server, not BTS, to support parsing of PHP pages.

@hackers_84 take a look at 'elementor' plugin for WordPress

Thanks Hatrix I'll take a look

Custom component is a suitable thing for some PHP code, but I think it would be good, if we can place the custom code anywhere inside the HTML without the DIV tag. So, we could create dynamic pages, looping HTML elements with PHP. This modification would be simple for the developers and effective for us to use server side codes.

@hatrix - thanks for the heads up about elementor, looks like a cracking way to build bespoke pages using Wordpress

I agree with placing PHP (server-side) custom code within HTML (i.e. tags '<?php' and '?>' are considered as commented code); however the actual parsing of PHP should be handled when the site is exported to a document folder associated with a PHP configured development or production web server, not within the BTS working canvas or BTS browser preview.

Yes, editing the file extension to php would help. Thanks.

Hi all,

could you include any sequence to insert content of the file - similar to php funkction include();? For example I wil have a file header.html where i have header code and i will insert this content to any page - index, about us, contact ... The same with footer.html.

thank you for answer

@jhunacek

Linked Components

This is a powerful feature which allows you to synchronize components, so changing one will automatically change the other. This is especially useful for things like headers and footers which you need to update across pages.

I think it's also demonstrated in the videos here: https://bootstrapstudio.io/tutorials/