Programatically embedding a Stack in 5.7x

Permalink
I found this solution for 5.5.1:
<?php
$stack = Stack::getByName('Header Menu');
$stack->display();
?>


but I can't find it's equal for 5.7x. Is there one? Or should this work in 5.7?

Pixelfixer
 
Pixelfixer replied on at Permalink Reply
Pixelfixer
Maybe it would help to describe what I want to do and maybe there is a better way than using Stacks in this manner.

I have a Sales Territory Map of the U.S. Currently, as you hover the cursor over a state, a pop-up window displays the assigned sales rep info. This all works fine. But to update this information requires opening the map-config.js file, scrolling through the code to find the info you want to change, then changing the appropriate text. This leaves the door WIDE open for my end user to muck it up. So, I was hoping I could find a way to embed a Stack, for example named "Rep_Florida" where the end user could make changes without needing to touch the map-config.js file. Below is an example of the code for the State of Florida within the map-config.js file:

'map_9':{
      'hover': 'FLORIDA<hr><font size="4">Jack Shulte</font><br>Account Manager<br>+1.888.224.3173<br>Jack.Schulte@minntronix.com',
      'url':'http://192.185.90.3/~minntronix/index.php/team/jack-shulte',
      'target':'same_window',
      'upColor':'#EBECED',
      'overColor':'#FFEE88',
      'downColor':'#993366',
      'enable':true,
   },


The 'hover': line is used to pass html code. I was hoping I could do something like this:
'map_9':{
      'hover': 'FLORIDA<hr><?php $stack = Stack::getByName(‘Rep_Florida’); $stack->display(); ?>’,
      'url':'http://192.185.90.3/~minntronix/index.php/team/jack-shulte',
      'target':'same_window',
      'upColor':'#EBECED',
      'overColor':'#FFEE88',
      'downColor':'#993366',
      'enable':true,
   },

Is this possible?