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.8 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 »
  • showsection droplet works "strangely"
  • Print
Pages: [1]   Go Down

Author Topic: showsection droplet works "strangely"  (Read 8750 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?
Logged

Offline crnogorac081

  • Posts: 2163
  • 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
Logged
Web developer

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 »
Logged

Offline crnogorac081

  • Posts: 2163
  • 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
Logged
Web developer

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
Logged

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

Logged

Argos

  • Guest
Re: showsection droplet works "strangely"
« Reply #6 on: August 21, 2009, 02:47:37 PM »
I'll move it there.
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • showsection droplet works "strangely"
 

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