I use the following code throughout my site to show various sections on various other pages.
// Change this to the section number you need!
$section_id = 35;
// 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');
}
and it works like a charm in PHP sections in the code AND it works like a charm in the index.php of my theme. I wanted to change it to a droplet, but the require word is not available in droplets, incidentally, I can't get it working.
I did find the ShowSection droplet, but it only works on WYSIWYG sections, not on other sections that I want to show (such as my own custom built BLOG section). I don't want to copy and paste the exact same code to hundreds of sections when I can just create a droplet to do the work.
My question is this:
Has anyone had success in creating a droplet that copies the contents of a specified non-wysiwyg section to another location?
the other problem is that ShowSection droplet doesn't process droplets down the chain, so if I stuff a droplet into a wysiwyg section, then use showsection to display that section elsewhere, it fails.
All I want to do is propagate data from one page to another, allowing both pages to show the same section.