Jump to content

Archived

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

bedandbreakfast

Dynamic content in a template

Recommended Posts

bedandbreakfast

I am working on a site for a co-operative where each member has their own "website" aka listing on the main site.  Each listing uses the same template but displays the information for that specific member.

 

I was thinking about creating a template with a 3 column section for example and then inject php code inside of this to call the dynamic information from my API.

 

I have tried it multiple ways but I thought I would be able to use a textbox section and put in the required <?php echo "/api.php?...."?> code to gather the information, however, I cannot get the php code to execute.  It is always displayed in its text form "<?php...?>".

 

Is there a way in pagelines to gather dynamic information via PHP and place it anywhere on any section in a template?  The returned response from the API will be the necessary HTML code to display images or information into the section.

 

I will not be using the content component section as all information for the members listings are stored in a mysql database and edited using a separate custom management interface.

 

Any assistance with how to accomplish this is greatly appreciated.  BTW I am extremely new to wordpress and pagelines as in the past I have been a "notepad" programmer.

 

Jason

Share this post


Link to post
Share on other sites
Rob

Hello Jason,

 

Interesting approach.  However, one I don't think we could support easily as it's a major customization.

 

That said, are you familiar with WP Multisite?   Our Developer edition supports this, and it would allow you to build websites for each person in DMS.  You could, in theory, create a standard basic template for all, then let them customize it.  With such a scenario, you could use tools like Mini-Loops, Special Recent Posts, etc to grab content from one site and put it onto another.

 

This might explain it more: http://codex.wordpress.org/Create_A_Network


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
bedandbreakfast

Thanks Rob,

 

At this time I don't want to implement Multisite for this client.

 

I have modified the textbox code to do what I am looking for (I know this is not recommended) allowing me to call my API functions by entering <?api command ?> into the textbox.

 

Thanks,

 

Jason

Share this post


Link to post
Share on other sites
Rob

I hope it survives the next update. 


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
bedandbreakfast

I realize this is an issue, however, I have not spent the time to figure out how to create a new section item that will do this so for now I have the code backed up so once an update happens I can rebuild the code easy.

 

Are there instructions on how to create (or copy) an existing section to a new one without requiring a developer license?

Share this post


Link to post
Share on other sites

×