WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.9 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • Help: How to show page_content() instead of section_id in droplet
  • Print
Pages: [1]   Go Down

Author Topic: Help: How to show page_content() instead of section_id in droplet  (Read 6828 times)

dennisvr

  • Guest
Help: How to show page_content() instead of section_id in droplet
« on: February 19, 2010, 06:19:32 PM »
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:
Code: [Select]
$block[1]   = 'Main contents';
$block[2]   = 'Product - panel 1';
$block[3]   = 'Product - panel 2';
$block[4]   = 'Product - panel 3';

My code so far:
Code: [Select]
$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:
Code: [Select]
<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>
Logged

Offline pcwacht

  • Posts: 2923
  • Gender: Male
    • Dutch ICT info
Re: Help: How to show page_content() instead of section_id in droplet
« Reply #1 on: February 19, 2010, 07:03:54 PM »
try adding
global $database, $wb;
at the very beginning of your droplet

Not sure if it'll work though


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

dennisvr

  • Guest
Re: Help: How to show page_content() instead of section_id in droplet
« Reply #2 on: February 19, 2010, 10:49:45 PM »
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
Logged

Offline crnogorac081

  • Posts: 2168
  • Gender: Male
Re: Help: How to show page_content() instead of section_id in droplet
« Reply #3 on: February 20, 2010, 11:51:55 AM »
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

Logged
Web developer

dennisvr

  • Guest
Re: Help: How to show page_content() instead of section_id in droplet
« Reply #4 on: February 22, 2010, 03:19:32 PM »
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
Logged

Offline crnogorac081

  • Posts: 2168
  • Gender: Male
Re: Help: How to show page_content() instead of section_id in droplet
« Reply #5 on: February 22, 2010, 03:38:12 PM »
See my first post on that link, there is a jq_tabs.js.txt file. Downlaod it, read it, and then use it.. :)
Logged
Web developer

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • Help: How to show page_content() instead of section_id in droplet
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2