# |
Jul 2nd 2017, 05:47 |
royalty |
updated |
# |
Jul 2nd 2017, 05:47 |
royalty |
https://gist.github.com/Modicrumb/3194d89c4d3fca329ae77bbf2973f17a |
# |
Jul 2nd 2017, 05:46 |
royalty |
I'll show both examples |
# |
Jul 2nd 2017, 05:46 |
royalty |
i'm saying i tried both |
# |
Jul 2nd 2017, 05:46 |
royalty |
even with an append though it doesn't work |
# |
Jul 2nd 2017, 05:45 |
royalty |
but defining the block in the options |
# |
Jul 2nd 2017, 05:45 |
royalty |
not appending |
# |
Jul 2nd 2017, 05:45 |
savant |
i dont see where you are appending? |
# |
Jul 2nd 2017, 05:44 |
royalty |
if i just don't start and end the block though it does append and problem solved lol |
# |
Jul 2nd 2017, 05:44 |
royalty |
https://gist.github.com/Modicrumb/3194d89c4d3fca329ae77bbf2973f17a |
# |
Jul 2nd 2017, 05:41 |
royalty |
yeah let me make a quick gist |
# |
Jul 2nd 2017, 05:41 |
savant |
we do something similar in CrudView to allow people to inject elements etc. into blocks |
# |
Jul 2nd 2017, 05:40 |
savant |
can you show an example of what you’re trying to do? |
# |
Jul 2nd 2017, 05:38 |
royalty |
no need to contain the scripts initially in a block |
# |
Jul 2nd 2017, 05:38 |
royalty |
eh i'm just going to spit out the scripts regardless and put the blocks after, heh |
# |
Jul 2nd 2017, 05:36 |
royalty |
but just curious why this is happening i guess |
# |
Jul 2nd 2017, 05:36 |
royalty |
i mean at the end of the day the initial content doesn't need to be in the block anyway i could make it come before the block |
# |
Jul 2nd 2017, 05:34 |
royalty |
ie, not using $this->start allows me to actually put stuff in the block but appending to a block doesn't seem to work if i am "initializing a block with content" |
# |
Jul 2nd 2017, 05:33 |
royalty |
it works if i simply spit the block out, putting scripts in it via the template using the 'block' option |
# |
Jul 2nd 2017, 05:32 |
royalty |
basically i am creating a block in the layout like so $this->start('script-dependencies'); and then echo $this->Html->scripts into it and end the block, in the template i am trying to append to the block but anything i append simply doesn't show up |
# |
Jul 2nd 2017, 05:31 |
savant |
and can answer |
# |
Jul 2nd 2017, 05:31 |
savant |
maybe someone is on |
# |
Jul 2nd 2017, 05:31 |
savant |
ask away |
# |
Jul 2nd 2017, 05:31 |
royalty |
hello doubt anyone is on but i'm having some trouble |
# |
Jul 2nd 2017, 04:46 |
smarty24 |
thanks |
# |
Jul 2nd 2017, 04:40 |
savant |
https://book.cakephp.org/3.0/en/tutorials-and-examples/blog/blog.html |
# |
Jul 2nd 2017, 04:40 |
smarty24 |
Ok. Do you mean the tutorial on cakephp website? |
# |
Jul 2nd 2017, 04:36 |
savant |
Just follow our tutorials and that will get you started |
# |
Jul 2nd 2017, 04:36 |
savant |
\o/ |
# |
Jul 2nd 2017, 04:36 |
savant |
there is your advice |
# |
Jul 2nd 2017, 04:36 |
savant |
So dont read and start coding |
# |
Jul 2nd 2017, 04:36 |
smarty24 |
Reading is important but I am not that type. I get bored after 10 minutes because I am not a faster reader... One of the reasons I dive into coding mostly to avoid bordom |
# |
Jul 2nd 2017, 04:19 |
spencdev |
I can't explain to you how much time I would have saved if I just actually read them |
# |
Jul 2nd 2017, 04:18 |
spencdev |
Read the docs... |
# |
Jul 2nd 2017, 04:17 |
savant |
Do your best! |
# |
Jul 2nd 2017, 04:16 |
savant |
Don’t give up? |
# |
Jul 2nd 2017, 04:16 |
smarty24 |
How are you. I am new to CakePHP or would say haven't started yet although it's on my to do list. Is there any advice I can get? |
# |
Jul 2nd 2017, 03:42 |
savant |
hi |
# |
Jul 2nd 2017, 03:41 |
smarty24 |
Hi I am new here. |
# |
Jul 2nd 2017, 02:26 |
ra7bi |
BTW , Thanks a lot Savant , |
# |
Jul 2nd 2017, 02:25 |
ra7bi |
but if this option is exist , i dont want to duplicate the code |