PDA

View Full Version : DD Tab content



Geline
09-07-2008, 01:46 PM
1) Script Title:
Tab Content Script (v 2.2)

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm

3) Describe problem:
I'm dying to use this script using a PHP content management system called CuteNews. So, I inserted the codes, did everything as instructed. When I am using regular divs, the tab contents work. However, when I tried inserting my PHP code to show my CuteNews, it does not show my PHP script even though I did not forget to use a file extension of .php on the file. How do I make PHP's work with the Tab Content Scripts? :confused:

ddadmin
09-07-2008, 05:34 PM
Are you generating the entire HTML markup of the script dynamically using PHP, or just the individual contents within each tab (with the rest already manually defined on the page)? If the former, it really depends on how CuteNews allows you to output its contents and using what template syntax. If the later, since each content DIV simply shows arbitrary HTML within it, you'd replace that HTML with the appropriate PHP code instead, such as:


<div style="border:1px solid gray; width:450px; margin-bottom: 1em; padding: 10px">

<div id="country1" class="tabcontent">
<? echo $content1;?>
</div>

<div id="country2" class="tabcontent">
<? echo $content2;?>
</div>

<div id="country3" class="tabcontent">
<? echo $content3;?>
</div>

</div>