That'll work in toplist conditions, but anywhere else in the javascript template I don't see the applicable. The javascript stuff had that specially removed in order to speed things up. In export.php you can replace
... just the example you have looks illogical since <table> is html, not javascript.
I wanted to use the conditional inside the javascript_export template.
I'm trying to make it easier for users to compose the javascript source url, let them choose the number, type, etc, without me having to provide any technical instructions explaining how the syntax in the url works.
I'm using a form that takes the users options and passes it off to another page that gives the javascript source url in a textarea so that they can copy and paste this into their page (it will also preview the results)
Currently users can select the category, number of links, how they want it sorted, etc... That part has been easy because it just adds to the javascript source url.
But I would also like for them to be able to choose options that would change the template. Another example of this would be an option to let them show the description or not.
And then have a conditional in my javascript template that says
<IF {SHOWDESCRIPTION} is yes> {LINKDESCRIPTION}</IF>
I read the manual entry but im either misunderstanding or doing something wrong. Because the above doesn't seem to work.
I know i can call different templates to do this, but would rather not have a template for every option (i have some custom fields that they may want to display)
That has nothing to do with variables and everything to do with the fact that in order to make it faster there is no conditionals syntax (nor any of the other end.php processing stuff) for javascript export.
0/5
1
2
3
4
5
This thread is closed, so you cannot post a reply.
Comments on Passing url variables
Forum Regular
Usergroup: Customer
Joined: Feb 19, 2004
Location: Michigan
Total Topics: 57
Total Comments: 185
Is there anyway to pass variables into the javascript feed template?
Here's an example url
And then put something like this in my javascript template?
Or is there some other way I could do something like this?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
As described at scripts.webmastersite.net/w...s/Global_Variables-14.html anything passed in the url is available as a template variable.
That'll work in toplist conditions, but anywhere else in the javascript template I don't see the applicable. The javascript stuff had that specially removed in order to speed things up. In export.php you can replace with ... just the example you have looks illogical since <table> is html, not javascript.
Forum Regular
Usergroup: Customer
Joined: Feb 19, 2004
Location: Michigan
Total Topics: 57
Total Comments: 185
I wanted to use the conditional inside the javascript_export template.
I'm trying to make it easier for users to compose the javascript source url, let them choose the number, type, etc, without me having to provide any technical instructions explaining how the syntax in the url works.
I'm using a form that takes the users options and passes it off to another page that gives the javascript source url in a textarea so that they can copy and paste this into their page (it will also preview the results)
I'm working on it here
Currently users can select the category, number of links, how they want it sorted, etc... That part has been easy because it just adds to the javascript source url.
But I would also like for them to be able to choose options that would change the template. Another example of this would be an option to let them show the description or not.
I'm trying to use
And then have a conditional in my javascript template that says
I read the manual entry but im either misunderstanding or doing something wrong. Because the above doesn't seem to work.
I know i can call different templates to do this, but would rather not have a template for every option (i have some custom fields that they may want to display)
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
That has nothing to do with variables and everything to do with the fact that in order to make it faster there is no conditionals syntax (nor any of the other end.php processing stuff) for javascript export.