How to set Global Variable.

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
mariella
New Member
New Member
Posts: 4
Joined: Tue Dec 03, 2013 8:41 pm

How to set Global Variable.

Post by mariella »

Hello,

I am sorry if this question is not suitable for this forum, but I can't seem to find the perfect place to post it. I am new to CMSMS, like practically newborn. We acquired a company that developed their website using CMSMS and now we inherit its maintenance. I am running into an issue that I know is because of my lack of experience with CMSMS. I am trying to display a “tag” {$jf_group_info.rm_email} from a template (Calguys Module Extensions -> Left Side Bar Template-> Sample Template) into the another template (Calguys Module Extensions ->Report Summary Templates). What I see in the website is that email being printed on the left side navigation and I need to also print it in the middle of the page. When I try to do that, nothing is printed. The tag is empty. I tried to find out where those tag would be defined but I am at no luck. I looked at Extensions-> User Defined Tags but is not there. I thought that maybe I could define a global tag like a session and assign that value there and then use it in the middle of the page.

Could someone point me to the right direction or documentation?

I added a screen shot of my problem.

Thanks,
Mariella.
Attachments
Tag-Issue.jpg
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: How to set Global Variable.

Post by Wishbone »

Normally variables that are set in one part of a page are available in another part of the page, as long as where the variable was set is before where the variable was used.

For example, in your site, if your content block was first in the template and floated right, then your sidebar was placed, you would be using the variable before it is set.

If everything is in the right order, I don't see why this wouldn't work. Where it's being set, you can try setting another variable with the content.

{assign var=my_test_var value=$jf_group_info.rm_email}

Then use ($my_test_var} where you need it.

If this doesn't work, you might want to post a request in the "Help Wanted" forum to hire a CMSMS expert to take a look.
mariella
New Member
New Member
Posts: 4
Joined: Tue Dec 03, 2013 8:41 pm

Re: How to set Global Variable.

Post by mariella »

Hi,

thank you so much for your answer! What you explained makes sense. I don't know how to figure it out though the other of the templates. Is there a place in CMSMS that I can look for that? digging thu the templates I was able to find this {$current_group.rm_email} which was being seeing in the template i wanted to display. That solved my issue but i would still would like to know how to see the template order...

Thanks,
Mariella.
Post Reply

Return to “Modules/Add-Ons”