Welcome, Guest. Please login or register.
Did you miss your activation email?
February 12, 2012, 06:04:11 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
149621 Posts in 21098 Topics by 7537 Members
Latest Member: lotte2
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Help: How to show page_content() instead of section_id in droplet  (Read 775 times)
dennisvr

Offline Offline

Posts: 20


« 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:
$block[1]   = 'Main contents';
$block[2]   = 'Product - panel 1';
$block[3]   = 'Product - panel 2';
$block[4]   = 'Product - panel 3';

My code so far:
Code:
$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:
<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
pcwacht
AddOn Development
*
Offline Offline

Posts: 2814



WWW
« 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

Offline Offline

Posts: 20


« 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
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1680



« 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: http://www.websitebaker2.org/forum/index.php/topic,14831.0.html

Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
dennisvr

Offline Offline

Posts: 20


« 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
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1680



« 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.. Smiley
Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!