# |
Jul 7th 2017, 20:52 |
birdy247 |
as it is then not extending AppController |
# |
Jul 7th 2017, 20:52 |
birdy247 |
App extneding aPlugin |
# |
Jul 7th 2017, 20:51 |
birdy247 |
it seems wrong |
# |
Jul 7th 2017, 20:51 |
birdy247 |
actually |
# |
Jul 7th 2017, 20:51 |
flashios09 |
then with js you can do `$('#data').data('page')` to read the value |
# |
Jul 7th 2017, 20:50 |
flashios09 |
or you can use a hidden div like this `div style=“display:none” data-page=“<?= $your_page_var ?>“></div |
# |
Jul 7th 2017, 20:48 |
flashios09 |
you can access cookies(read/write) on php and js |
# |
Jul 7th 2017, 20:47 |
flashios09 |
@spencdev as i said before, try cookies |
# |
Jul 7th 2017, 20:47 |
akkaweb |
Thanks @inoas |
# |
Jul 7th 2017, 20:46 |
spencdev |
but instead of outputting more/' + Page + ' yadda it converts it to entities |
# |
Jul 7th 2017, 20:46 |
birdy247 |
MyComputers extends PluginsComputers |
# |
Jul 7th 2017, 20:45 |
birdy247 |
my app is extending the plugins controller |
# |
Jul 7th 2017, 20:45 |
spencdev |
sorry, build not script |
# |
Jul 7th 2017, 20:44 |
spencdev |
like:`url: '?= $this->Url->script(['action' => 'more', "'+Page+'", '?' => $this->request-getQueryParams()])` |
# |
Jul 7th 2017, 20:44 |
flashios09 |
your plugin controller will extend the cake controller |
# |
Jul 7th 2017, 20:44 |
flashios09 |
@birdy247 i didn’t try this before but i think it works |
# |
Jul 7th 2017, 20:42 |
flashios09 |
try cookie |
# |
Jul 7th 2017, 20:42 |
flashios09 |
i used a php var in a js *inline* code |
# |
Jul 7th 2017, 20:41 |
birdy247 |
If a plugin has a controller, is it ok to use my own controller and extend the plugins controller> |
# |
Jul 7th 2017, 20:41 |
spencdev |
Yeah, trying to do an ajax call using a javascript variable keeping track of what page it is |
# |
Jul 7th 2017, 20:41 |
flashios09 |
hi |
# |
Jul 7th 2017, 20:41 |
birdy247 |
Hi |
# |
Jul 7th 2017, 20:40 |
flashios09 |
url->build on a ctp file ? |
# |
Jul 7th 2017, 20:39 |
spencdev |
is there anyway to use javascript variables in the Url->build? |
# |
Jul 7th 2017, 20:33 |
flashios09 |
on windows i have something like this `http://my_domain.ext/MyController/test/files/customerinvoices/1-1-1499456513.xlsx` |
# |
Jul 7th 2017, 20:32 |
flashios09 |
for example: ``` $file = '/files/customerinvoices/1-1-1499456513.xlsx'; $url = Router::url($file, true); debug($url); ``` the output: `http://my_domain.ext/files/customerinvoices/1-1-1499456513.xlsx` |
# |
Jul 7th 2017, 20:29 |
flashios09 |
the controller redirect method works fine on an unix base server |
# |
Jul 7th 2017, 20:27 |
flashios09 |
recently one of my customers use it on a Windows Server(not unix base OS) |
# |
Jul 7th 2017, 20:26 |
flashios09 |
i have an old cakephp2 project |
# |
Jul 7th 2017, 20:26 |
flashios09 |
hi |
# |
Jul 7th 2017, 18:59 |
josh_rodarte |
@inoas Yeah. I forgot what it did but I know null removed the attribute all together. Realized I need more html for what I'm doing so its a non-issue for me now. |
# |
Jul 7th 2017, 18:31 |
glanceded |
It seems it is called by cakephp when trying to change datatype, but I have included the file, the namespaces are ok... |
# |
Jul 7th 2017, 18:28 |
glanceded |
should I try ::build? |
# |
Jul 7th 2017, 18:28 |
glanceded |
I'm trying to create a type and i'm getting this error Unknown type "App\Database\Types\IpType" InvalidArgumentException |
# |
Jul 7th 2017, 18:06 |
inoas |
null or false probably not but did '' (empty string) not work? |
# |
Jul 7th 2017, 17:52 |
josh_rodarte |
Thanks. I dove into the helper's code and empty attributes don't appear to be supported. |
# |
Jul 7th 2017, 17:51 |
inoas |
like 'data-my-html-5-data-attrib' => '' |
# |
Jul 7th 2017, 17:51 |
inoas |
josh_rodarte without knowing I would try 'yourAttrib' => '' |
# |
Jul 7th 2017, 16:28 |
phpubar |
Thanks, @hmic. My boss was trying to blame excessive session updates on a particular status check route, but I double-checked and no session is created, so false alarm :slightly_smiling_face: |
# |
Jul 7th 2017, 16:22 |
josh_rodarte |
Is it possible to add empty attributes with HTMLHelper? |
# |
Jul 7th 2017, 16:19 |
origamiwork |
hmic: Yes, lol. So I assume you're talking about parsing the file names in src/Controller using straight php to get the controller names? I'm considering that, but if there's a built in way to get the controller names in cakephp 3 I would prefer to use that. Sorry if i'm not understanding correctly. |