Help: How to show page_content() instead of section_id in droplet

crnogorac081

See my first post on that link, there is a jq_tabs.js.txt file. Downlaod it, read it, and then use it.. :)
Web developer

dennisvr

Hi,

Thank you for the suggestion, this could actually work for me.
Unfortunately the download links are broken, both in the post as well as on AMASP (but I'll search a little more).

Also, if there is anyone who is able to answer the orginal question:
"How to show page_content() instead of section_id in droplet?"

Please do post a solution (for others who might want to write a droplet that uses "page_content()".)

Cheers!
Dennis

crnogorac081

Hi,

An year ago, I made a preset for members module for these tabs.

You can see demo and download it here: https://forum.websitebaker.org/index.php/topic,14831.0.html

Web developer

dennisvr

Hi John,

Thank you for the fast reply.
Unfortunately your suggestion did not work.

It did, however, move the CSS / script declarations from the <head> to the <body>.

I'm not a coder, so the above just FYI.

Dennis

pcwacht

try adding
global $database, $wb;
at the very beginning of your droplet

Not sure if it'll work though


Have fun,
John
[url="http://www.ictwacht.nl"]http://www.ictwacht.nl[/url] = Dutch ICT info
[url="http://www.pcwacht.nl"]http://www.pcwacht.nl[/url] = My first
both still work in progress, since years.....

dennisvr

Hi,

I would like to implement tabs using: http://amazon.flowplayer.org/tools/index.html

I will be using three tabs, so I have defined 4 blocks in my template:

$block[1]   = 'Main contents';
$block[2]   = 'Product - panel 1';
$block[3]   = 'Product - panel 2';
$block[4]   = 'Product - panel 3';


My code so far:

$html ='<ul class="tabs">';
$html .='<li><a href="#">Description</a></li>';
$html .='<li><a href="#">Specification</a></li>';
$html .='<li><a href="#">Availability</a></li>';
$html .="</ul>";
$html .='<div class="panes">';
$html .="<div>".page_content(2)."</div>";
$html .="<div>".page_content(3)."</div>";
$html .="<div>".page_content(4)."</div>";
$html .="</div>";
return $html;


Problem is, the page_content is shown at the top of the <body>, and not in the assigned DIVs.

I have seen many topics covering the use of the section_id, but I would rather use the page_content() for simplicity.

Can anybody help me out?

Thank you in advance.

Regards,

Dennis

P.s. This works when hardcoding it in my template:

<ul class="tabs">
  <li><a href="#">Description</a></li>
  <li><a href="#">Specification</a></li>
  <li><a href="#">Availability</a></li>
</ul>

<div class="panes">
  <div><?php page_content(2?></div>
  <div><?php page_content(3?></div>
  <div><?php page_content(4?></div>
</div>