I apreciate if someone can help, How can make this process more flexible? passing variable parameters to CC from an article
I can have different articles and CC's matched
ARTICLE1=> {chronoconnectivity5}edit_exams_form1{/chronoconnectivity5}
CC 1=>
<?php
return array("examen" => "6");
?>
ARTICLE2=> {chronoconnectivity5}edit_exams_form2{/chronoconnectivity5}
CC 2=>
<?php
return array("examen" => "7");
?>
I can have different articles and CC's matched
ARTICLE1=> {chronoconnectivity5}edit_exams_form1{/chronoconnectivity5}
CC 1=>
<?php
return array("examen" => "6");
?>
ARTICLE2=> {chronoconnectivity5}edit_exams_form2{/chronoconnectivity5}
CC 2=>
<?php
return array("examen" => "7");
?>
Hi Teldrive,
Please try this:
You should be able to pass any parameters this way.
Regards,
Max
Please try this:
{chronoconnectivity5}edit_exams_form1&examen=6{/chronoconnectivity5}
You should be able to pass any parameters this way.
Regards,
Max
Hi Max, thanks by reply
but i have issue also in the other side CC
ARTICLE2=> {chronoconnectivity5}edit_exams_form2&nivelx=6{/chronoconnectivity5}
in html
i have been testing without sucess
could you help me to complete this puzzle?
but i have issue also in the other side CC
ARTICLE2=> {chronoconnectivity5}edit_exams_form2&nivelx=6{/chronoconnectivity5}
in html
i have been testing without sucess
<?php
return array ('examen'=> 'nivelx');
?>
<?php
$uri =& JFactory::getURI();
$var=$uri->getVar('nivelx');
return array ('examen'=> $var);
?>
<?php
$var = $_POST['nivelx'];
return array ('examen'=> $var);
?>
could you help me to complete this puzzle?
What are you trying to do exactly ? my code will simply pass "examen" with the value = 6 to the connection, you may for example use it in the conditions box or some where else.
Hi Max, so far the issue is how to get the 'nivelx' parameter value into CCv5 enviroment to be used in condition, I am lost
I changed name of parameter in order don't get confussion with names
'nivelx' is parameter passed by article
'examen' is field name of database
if I set in article:
ARTICLE2=> {chronoconnectivity5}edit_exams_form2&nivelx=6{/chronoconnectivity5}
in html
and in conditions (this doesn't work)
<?php
return array ('examen'=> "nivelx"); //also tried with 'nivelx'
?>
.....also tried
<?php
$var=$form->data['nivelx'];
return array ('examen'=> $var);
?>
I changed name of parameter in order don't get confussion with names
'nivelx' is parameter passed by article
'examen' is field name of database
if I set in article:
ARTICLE2=> {chronoconnectivity5}edit_exams_form2&nivelx=6{/chronoconnectivity5}
in html
and in conditions (this doesn't work)
<?php
return array ('examen'=> "nivelx"); //also tried with 'nivelx'
?>
.....also tried
<?php
$var=$form->data['nivelx'];
return array ('examen'=> $var);
?>
No, try this:
<?php
return array ('examen'=> $_GET["nivelx"]);
?>
I tried Max, but is not working yet
I tested (in list display -> header code) to check what value it takes but it gives me php error code
CC debug shows
<?php
return array ('examen'=> $_GET["nivelx"]); //also tried $_GET['nivelx']);
?>
I tested (in list display -> header code) to check what value it takes but it gives me php error code
<?php
$var = $_GET['nivelx']);
echo "test =>".$var."<br>";
?>
CC debug shows
[2] => SELECT COUNT(*) AS `exa.count` FROM `pn6x7_examen_form` AS `exa` WHERE `exa`.`examen` = ''
Ok, please try this instead:
return array ('examen'=> \GCore\Libs\Request::data("nivelx"));
Max, still fails
just to double-check i have in article
also tried with
and in CCv5 condition
no data seems to be passed to cc
just to double-check i have in article
{chronoconnectivity5}list_exams_form&nivelx=6{/chronoconnectivity5}
also tried with
{chronoconnectivity5}list_exams_form&{nivelx=6}{/chronoconnectivity5}
and in CCv5 condition
<?php
return array ('examen'=> \GCore\Libs\Request::data('nivelx')); // also tried with "nivelx"
?>
no data seems to be passed to cc
Please test using this code in the "header" box:
What do you get ?
<?php
pr($_POST);pr($_GET);
?>
What do you get ?
Hi Max, same results,
I send you debug screen, results obtained in list are equivalent to return ("examen"=>"0") so no params are passed
[attachment=0]Captura.JPG[/attachment]
I send you debug screen, results obtained in list are equivalent to return ("examen"=>"0") so no params are passed
[attachment=0]Captura.JPG[/attachment]
The $_GET var is totally empty, that's weird!
Do you have SEF enabled ? if yes then could you please test with it disabled ?
Do you have SEF enabled ? if yes then could you please test with it disabled ?
Hi Max, i disabled SEF, but all links of web page get broken, anyway i tested it and I've got some return from $_Get query, but nothing related to param " &nivelx=3"
[attachment=0]Captura.JPG[/attachment]
[attachment=0]Captura.JPG[/attachment]
Ok, I have just made this test:
#1- connection name is "content", so I inserted in my article:
#2- I inserted this code in the conditions (and also the header) box:
that returned the correct value which is 1, so you should be able to use
You can also use this line to get all the request values:
Regards,
Max
#1- connection name is "content", so I inserted in my article:
{chronoconnectivity5}content&test=1{/chronoconnectivity5}
#2- I inserted this code in the conditions (and also the header) box:
pr(\GCore\Libs\Request::data("test"));
that returned the correct value which is 1, so you should be able to use
\GCore\Libs\Request::data("test")
You can also use this line to get all the request values:
\GCore\Libs\Request::raw()
Regards,
Max
:D Thanks a lot Max, in special by your patiente with me, we have got it
let me show you final results
Working condition code
front-list-table-header code
and results capture
[attachment=0]Captura1.JPG[/attachment]
my big question, why &-->amp; is not recognized as separator?????😲
let me show you final results
Working condition code
<?php
return array ('examen'=> \GCore\Libs\Request::data("amp;nivelx"));
?>
front-list-table-header code
<?php
pr($_POST);pr($_GET);
pr(\GCore\Libs\Request::data("amp;nivelx"));
pr(\GCore\Libs\Request::raw());
?>
and results capture
[attachment=0]Captura1.JPG[/attachment]
my big question, why &-->amp; is not recognized as separator?????😲
Please disable the editor when you enter the plugin code in your article, that's why the amp; is added, which should NOT be there of course, that's a problem!
You are right
i will have in mind
thanks again
<td style="background-color: #dddada;">{chronoconnectivity5}list_exams2_form&nivelx=3{/chronoconnectivity5}</td>
i will have in mind
thanks again
By the way, I have found a simple workaroung for this saving article in source code mode
This topic is locked and no more replies can be posted.