Thursday, September 6, 2012

Re: how to understand some English sentences in the cook book?

Got it. pretty thanks.


在 2012年9月5日星期三UTC-5下午1时35分27秒,cricket写道:
On Wed, Sep 5, 2012 at 3:13 AM, shyandsy <shya...@gmail.com> wrote:
> I am so sorry abou these easy question. This approve I am so weak in English
> skill.
> Please give me some instruction, thanks a lot.
>
> 1.The first sentence as below:
> "New in version 2.1. Blocks replace the deprecated $scripts_for_layout
> layout variable. Instead you
> should use blocks. The HtmlHelper ties into view blocks, and its script(),
> css(), and meta()
> methods each update a block with the same name when used with the inline =
> false option"

If you specify inline = false then Cake will insert the meta, script,
or css tag inside a block with the same name. These blocks are
automatically created.

If you specify inline = true, the tag will be created within the view
part of your HTML.

[html]
        [head]
                // inline = false
                [meta block: meta, meta, ...]
                [script block: -- script, script, ...]
                [css block: -- css, css, ...]
        [/head]
        [body]
                //  inline = true
                [meta tag]
                [script tag]
                [script tag]
                [script tag]
                [css tag]
                [css tag]
        [/body]
[/html]

>
> 2.The HtmlHelper also allows you to control which block the scripts and CSS
> go to

That means that you can tell Cake where to put the script/css/meta tag.

$this->Html->script(
        'script_for_sidebar',
        array('block' => 'sidebar')
);

// sidebar block
[div id="sidebar"]
        [script src="/js/script_for_sidebar.js"]
        ...
[/div]

--
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
 
 

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate