How to put PHP Includes in a page

6 posts by 4 authors in: Forums > CMS Builder
Last Post: March 26, 2010   (RSS)

By (Deleted User) - March 25, 2010

We want to put a php include on the articles pages (it is like an "ending" we want to use for several articles and after having created the include file, and put it into a wysiwyg field, when rendered, it changes the references to the external file as follows: <[/#0000ff]p[/#800000]>[/#0000ff]<!--p include("en/includes/states-closing.php")-->[/#008000]</[/#0000ff]p[/#800000]>[/#0000ff]</[/#0000ff]p[/#800000]>[/#0000ff]

instead of:
[/#0000ff]<p>
<?php include("en/includes/states-closing.php");?>
</p>[/#0000ff]

It replaces the <?php for <!--p and [/#0000ff]It doesn't show the content of the external page.

How can we do it?

Thank you.

Re: [rneube] How to put PHP Includes in a page

By Jason - March 25, 2010

Hi,

It's usually not a good idea to add php code directly into the editor. The easiest way to do this is to go directly into your viewer file and add the php include directly into there.

Let me know if that works for you.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] How to put PHP Includes in a page

By (Deleted User) - March 25, 2010

Hi Jason,

It may not be a good idea, but from our perspective, it would be very important to achieve that. For instance, a call to "order here" that could be placed on the middle of the article, separating topics, or even a banner served by another application. I don't know, but everybody includes something at the articles to sell something.

Even if you use Joomla (that I don't like at all) there are add ons that you can install that would allow you to create a form or to include php code.

It would really helps us if CMS Builder could come with something like this.

Thank you anyway.

Re: [rneube] How to put PHP Includes in a page

By InHouse - March 25, 2010

Just musing aloud here, but could your content be moved to a non WYSIWYG text box? You might find it easier to embed parsable code in there.

Alternately, you could scan through your content at rendering time and insert your included code after N-number of paragraphs/linebreaks.

$0.02 worth.

Jayme

Re: [Dave] How to put PHP Includes in a page

By (Deleted User) - March 26, 2010

Thank you very much! excellent ideas (both posts). I will try them now.

Thanks again!