By: RobN
Date: 2010-10-28
Time: 01:38
|
Passing parameter to TBS in Joomla
Is it possible for TBS use a variable passed when article is loaded?
For example if it is called with:
index.php?option=com_content&view=article&id=25&Itemid=12&profile=2
it can pull out the profile=2 part or something along those lines?
|
By: Skrol29
Date: 2010-10-28
Time: 10:52
|
Re: Passing parameter to TBS in Joomla
Hi?
profile=2 can be retrieved in PHP trough $_GET['profile'] or in the template using [var._GET.profile].
|
By: RobN
Date: 2010-10-28
Time: 18:39
|
Re: Passing parameter to TBS in Joomla
So, I have code that says:
{tbs}mergeblock=m;sql=SELECT url, summary, name, sport FROM users WHERE user_id = profile{/tbs} |
I've tried both of [var._GET.profile] and $_GET['profile'] but both give MySQL errors.
This is just a normal article page, so I can only use HTML and stuff within {tbs} tags.
Thanks for your help so far.
|
By: RobN
Date: 2010-10-28
Time: 18:54
|
Re: Passing parameter to TBS in Joomla
Ah, I've done it in an embedded script. Would there be any issues with doing that way rather than via an external script?
|
By: Skrol29
Date: 2010-10-28
Time: 23:06
|
Re: Passing parameter to TBS in Joomla
It should works also in an embedded script.
There is a security point with embedded scripts in TBS articles: be sure that only admins are allowed to edit the article.
|
|
Posting in progress.
Please wait...
|