PhP or Virtual includes...

10 posts by 4 authors in: Forums > CMS Builder
Last Post: March 25, 2019   (RSS)

By osga - March 20, 2019

Hello...

We a re tyring to use either the... <!--#include virtual="page.html" --> or <?php include 'page.html';?> ...in the bodies of articles, but CMSB, seems to ignore them. Any hints?

Hi,

What do you mean by "CMSB ignores them".

I've been using the format <?php include ("page.php"); ?> and it works for me, but I think that it should work for including html pages as well.

Just a guess, but if there's PHP code that needs to be executed in the included copy, I think the included page may have to end in .php (not sure).

Hope that helps,

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

By daniel - March 20, 2019

Hi osga,

Are you placing the include statements within PHP files, or are you adding them to content fields in the CMS? PHP functionality (such as include statements) won't parse from within content fields. 

Daniel
Technical Lead
interactivetools.com

By osga - March 21, 2019

We were trying to use them in the Content Field of an article in cms, but since neither way will parse, we will do something else...

Thanks Guys...

It would be helpful if you posted a sample of the code you're trying to use including the context of where you're using it.

Best,

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

By osga - March 25, 2019

We were trying to use the codes included in the first post I created

<!--#include virtual="page.html" --> or <?php include 'page.html';?>

I even tried the one suggested <?php include ('page.html');?>

but none of it has worked. 

By gkornbluth - March 25, 2019 - edited: March 25, 2019

Some actual trial page code would still be helpful

It's hard to tell what's going on from a few snippets

Thanks,

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

By daniel - March 25, 2019

Hey Jerry,

I believe that they are just attempting to add the includes within CMSB content fields (which isn't supported), so there wouldn't really be any other code to show.

Cheers,

Daniel
Technical Lead
interactivetools.com

Hey Daniel,

I thought the same, but wanted to be sure and maybe offer an alternative.

Jerry

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php