The global-variables tag has no wiki summary.
0
votes
1answer
25 views
Reason why site_url would work in template, but not current_url?
I have the following code using the {site_url} variable, like so:
<div class="g-plusone" data-annotation="inline" data-width="300" data-href="{site_url}">
However, when I changed the variable ...
3
votes
1answer
64 views
How to create a global variable inside config.php
I'm trying to build a simple config bootstrap for use in multi-server environments. I realise there are lots of config bootstraps around, but a lot of the popular ones seem a bit complicated for what ...
2
votes
1answer
30 views
Retrieving/setting cookie in index.php
I'm attempting to retrieve a cookie in index.php to record the value in a global_variable. I'd like to do it this way to avoid including PHP/plugin code on every template. Currently I have;
...
1
vote
1answer
36 views
Is it correct to put “{site_url}” inside a global variable?
As the title says, is it correct? Thanks
2
votes
1answer
39 views
Display Number of Active Members
I'd like to be able to display the number of "active" members on a site. Ideally this would be something like "number of members who have logged in in the past 30 days".
Barring that, I'd settle for ...
2
votes
3answers
29 views
Conditional with Ip Address
This one has me baffled.
I'd like to show some content based on the Global variable IP Address. But none of these work:
{if {ip_address} != 127.0.0.2}SHOW THIS{/if}
OR
{if {ip_address} != ...
3
votes
2answers
103 views
Global Variable Parsing in Add-On Module
Trying to figure out what appears to be a global variable parse issue in a module add-on template tag.
Here's a sample of the tag used in the template:
{exp:syn_fb_comments:show ...
1
vote
1answer
48 views
Development (Local) with multiple sites using host file and IIS7 - Can't get FCPATH to recognize - Encoded characters
I am stuck again using IIS7 on a windows server. Trying to replicate the production environment for some testing on a Win7 box using IIS7 and host file to point o the sites.
I have tried using ...
2
votes
2answers
61 views
Website's Company Information Stored In A Channel - good or bad?
I created a channel that has fields like:
company name
address
a matrix of daily working hours
etc
Throughout the site, I need to display bits and pieces of this data. Does that mean I need to use ...
2
votes
3answers
208 views
path=logout - how to configure URL it redirects to?
I have put a logout link on my site. When I click it, I am logged out and redirected to the homepage. How do I specify a different page to redirect to?
0
votes
3answers
48 views
Problem with custom global variable
I created a custom config file with my own global variable.
When I'm using the EE debugger, I have an output of my global variables:
So, I guess, they exists and I can access to them.
The problem ...
5
votes
3answers
119 views
Breaking my HTML into tiny pieces - template, snippets, or globals?
In order to maximize code reuse, I'm trying to break down the mark up for each of my form fields into individual "containers" (e.g. a template, snippet, global). The project I am working on is ...
4
votes
3answers
86 views
setting a global var in an embedded template with PHP
I have a header template with PHP parsing on Input an the following code:
<?php
$this->EE->config->_global_vars['user_language'] = "nl";
?>
When I use {user_language} in my ...
2
votes
2answers
98 views
Why wouldn't global variable parse correctly with Master Config?
Using Focus Lab's Master Config, I've set a test global variable for production, like so:
$env_global['global_test'] = 'test';
Then in an embedded template I've dropped in {global_test}. Also tried ...
8
votes
2answers
236 views
What is the difference between a global variable, a snippet and an embedded template?
What is the difference between a global variable, a snippet and an embedded template?
When and where should I be using each of them?
