Hi,
Our users zre given a special url
such as "http://mysite/?myvar=3" which we then need to reference across a series of menus linked to articles containing links to one or more embedded Fabrik forms via the content plugin. So, each menu item will link to an article that has one of more of something similar to the following in it's body:
{fabrik view=form id=1 rowid=[myvar]}
{fabrik view=form id=3 rowid=[myvar]}
...that all works well on the INITIAL page load because the myvar variable is in the url string. We have also been able to persist the value in the site template using "$myvar = $app->getUserStateFromRequest( "$option.myvar", 'myvar', NULL);"
It is our hope to have this variable be stored in only one place after being pulled form the initial URL string and somehow referenced from all the subsequent articles linked to off the site menu that contain the Fabrik content plugin form links which need to soemehow reference the variable.
So:
1) Is the path we are going down the best way to approach something like this?
2) What is the best way to reference the variable across the menu links to the articles that contain the Fabrik content plugin references for all the embedded forms?
3) We are open to adding references in multiple places if needed (maybe via calc elements or something), but would prefer to have only one instance somewhere if possible
4) Keep in mind that the variable is "created" once per session from the user passing it in the initial url query string - this is the one factor we cannot alter
5) We can persist it using the method described above as a variable in the site template, just not sure if that's the best place and if so how can we then best reference it? If not, we are open to alternative persistence options
6) We are also open to append it the the menu link query string is if there is a way to do that and it is needed
Any and all ideas on how best to tackle this are appreciated and we are open to ANY alternate methods to meet the goal of having each embedded Fabrik form in each article linked to off each of the menu items be able to filter the form rows based on the variable's value.
TIA,
Dale
Our users zre given a special url
such as "http://mysite/?myvar=3" which we then need to reference across a series of menus linked to articles containing links to one or more embedded Fabrik forms via the content plugin. So, each menu item will link to an article that has one of more of something similar to the following in it's body:
{fabrik view=form id=1 rowid=[myvar]}
{fabrik view=form id=3 rowid=[myvar]}
...that all works well on the INITIAL page load because the myvar variable is in the url string. We have also been able to persist the value in the site template using "$myvar = $app->getUserStateFromRequest( "$option.myvar", 'myvar', NULL);"
It is our hope to have this variable be stored in only one place after being pulled form the initial URL string and somehow referenced from all the subsequent articles linked to off the site menu that contain the Fabrik content plugin form links which need to soemehow reference the variable.
So:
1) Is the path we are going down the best way to approach something like this?
2) What is the best way to reference the variable across the menu links to the articles that contain the Fabrik content plugin references for all the embedded forms?
3) We are open to adding references in multiple places if needed (maybe via calc elements or something), but would prefer to have only one instance somewhere if possible
4) Keep in mind that the variable is "created" once per session from the user passing it in the initial url query string - this is the one factor we cannot alter
5) We can persist it using the method described above as a variable in the site template, just not sure if that's the best place and if so how can we then best reference it? If not, we are open to alternative persistence options
6) We are also open to append it the the menu link query string is if there is a way to do that and it is needed
Any and all ideas on how best to tackle this are appreciated and we are open to ANY alternate methods to meet the goal of having each embedded Fabrik form in each article linked to off each of the menu items be able to filter the form rows based on the variable's value.
TIA,
Dale