Jump to content

Use php in database article


Recommended Posts

Hello I have created a pages database and made a text area field allowing raw html. Only a specific trusted group will have access to edit the articles in the database.

However I noticed I am not able to use php in the html. For example I can't call theme resource images. Is there a way to get this to work? 

Another example, I wanted to use an array as well like in the example here 



{{$servers = array('' => "Operation", '' => "Realism", '' => "Tactical Co-Op", '' => "Training", '' => "Day of Infamy", '' => "Fun Co-Op");}}
<ul class='ipsList_inline>
{{foreach $servers as $ip => $title}}
   {$title} : {$ip}

My code gets printed as text only though.

Link to comment
Share on other sites

Sorry, it is not possible to utilize PHP in the editor. To add images to the editor is fairly easy and does not require PHP.

If you're looking to utilize the same image over and over again in the same spot. You may want to utilize a template (where you can use PHP) and some sort of dropdown as a database field to signify which image is used in that spot.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...