Welcome, Guest. Please login or register.
Did you miss your activation email?
May 25, 2012, 04:19:25 PM

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.
155510 Posts in 21712 Topics by 7738 Members
Latest Member: chris85
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: showsection droplet works "strangely"  (Read 932 times)
avitaly

Offline Offline

Posts: 33


« on: August 21, 2009, 07:52:11 AM »

After having upgraded to WB 2.8, "showsection" doesn't work properly. From index.php, it takes the last section of the same page in whicn it is included. So, for example:

Quote
<div class="container">

<!-- bottom left information -->
    <div class="bottomcolumn">
    [[showsection?section=175]]
    </div>

<!-- bottom center information -->
    <div class="bottomcolumn">[[showsection?section=176]]</div>

<!-- bottom right information -->
    <div class="bottomcolumn bottomright">[[showsection?section=177]]</div>
           
        </div>

In the home page (http://agnesevardanega.altervista.org/), you may see section 175 repeated; in another page, where showsection is used before (in the main content: http://agnesevardanega.altervista.org/pages/didattica/sociologia.php), it is this last section to be repeated.

What is happening?
Logged
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« Reply #1 on: August 21, 2009, 11:13:51 AM »

Hi,

I had the same issue here Smiley)

It seems you cant use same droplet more than once in template..

I solved it by replacing droplet code with this code:

Code:
<?php
// Change to the number you need!
$section_id 65;

// Get requested section for requested page
$query_sections $database->query("SELECT section_id,module FROM ".TABLE_PREFIX."sections WHERE section_id = '$section_id' ");

// Make sure there is one
if($query_sections->numRows() > 0) {
    
$section $query_sections->fetchRow();
    
$section_id $section['section_id'];
    
$module $section['module'];
    require(
WB_PATH.'/modules/'.$module.'/view.php');

?>


try, it should work for you too Smiley

cheers
Logged

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

Offline Offline

Posts: 33


« Reply #2 on: August 21, 2009, 11:50:28 AM »

It's a kind of magic!  grin

grazie

PS - added - evidently, it is not possible to use more than one in each page ... and it seems a "new feature" in wb 2.8
« Last Edit: August 21, 2009, 11:53:12 AM by avitaly » Logged
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« Reply #3 on: August 21, 2009, 12:18:55 PM »

I didnt tested that, bit it would be a great dissadvantage Smiley

cheers
Logged

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

Offline Offline

Posts: 33


« Reply #4 on: August 21, 2009, 01:20:25 PM »

I suppose it is so, because in the second page (http://agnesevardanega.altervista.org/pages/didattica/sociologia.php) the first droplet is in the main content section, and it was replicated by the droplets in the index.php (which are collocated after the main content and before the footer).

 huh Maybe the droplet needs to be corrected
Logged
erpe

Offline Offline

Posts: 2077


WWW
« Reply #5 on: August 21, 2009, 01:42:59 PM »

Maybe it is a good idea to post this in the droplet thread so the author gets notice of this.

rgds

erpe

Logged

Argos
Moderator
**
Offline Offline

Posts: 2158


WWW
« Reply #6 on: August 21, 2009, 01:47:37 PM »

I'll move it there.
Logged

Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase: http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
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!