Author Topic: showsection droplet works "strangely"  (Read 3327 times)

avitaly

  • Guest
showsection droplet works "strangely"
« on: August 21, 2009, 08: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?

Online crnogorac081

  • Posts: 1978
  • Gender: Male
Re: showsection droplet works "strangely"
« Reply #1 on: August 21, 2009, 12:13:51 PM »
Hi,

I had the same issue here :))

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

I solved it by replacing droplet code with this code:

Code: [Select]
<?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 = &#39;$section_id&#39; ");

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

?>


try, it should work for you too :)

cheers
UI / UX Designer

avitaly

  • Guest
Re: showsection droplet works "strangely"
« Reply #2 on: August 21, 2009, 12:50:28 PM »
It's a kind of magic!  :-D

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, 12:53:12 PM by avitaly »

Online crnogorac081

  • Posts: 1978
  • Gender: Male
Re: showsection droplet works "strangely"
« Reply #3 on: August 21, 2009, 01:18:55 PM »
I didnt tested that, bit it would be a great dissadvantage :)

cheers
UI / UX Designer

avitaly

  • Guest
Re: showsection droplet works "strangely"
« Reply #4 on: August 21, 2009, 02: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).

 :? Maybe the droplet needs to be corrected

erpe0812

  • Guest
Re: showsection droplet works "strangely"
« Reply #5 on: August 21, 2009, 02: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


Offline Argos

  • Posts: 2542
  • Gender: Male
    • Argos Media
Re: showsection droplet works "strangely"
« Reply #6 on: August 21, 2009, 02:47:37 PM »
I'll move it there.
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
----------------------------------------------------------------
Please don't request personal support, use the forums!