RSS

Tag Archives: HTML

Web turns 20 today

Happy Birthday, Web!

The Web turns 20 today. Twenty years ago today, Tim Berners-Lee wrote the world’s first website, a placeholder page in the then-nascent Hypertext Mark-Up Language.

The original (can there be an original?) page is mirrored here and it’s a fascinating look at the seed crystal that catalyzed change to the world as we knew it in those heady pre-Internet days.

Read more at domyinc.in

 
Leave a comment

Posted by on August 7, 2011 in Technology, Web

 

Tags: , , , , , , ,

$scripts_for_layout

What?
$scripts_for_layout is a variable used in the CakePHP framework.

Why?
To declare the CSS/JS files specific to any page, within the page view template itself, still place them inside the header tag on the fly.

E.g. Alert.css is specific to Alerts.ctp page. This is not required for the other pages in the site. So, the user can declare the CSS file inside Alerts.ctp page using $scripts_for_layout. CakePHP places it inside the header.

When?
When you include a unique page, or a page with unique features.

How?
CakePHP includes $scripts_for_layout variable within its default template named default.ctp file within the view/layouts folder.

Add the following line to the view file to include a CSS
Html->css(“jquery.ganttView”, null, array(“inline”=>false)); ?>

This is the how you can include a Javascript
<!–?php $this->Html->script(‘date’, $inline=false); ?>

 

 
Leave a comment

Posted by on July 3, 2011 in CakePHP

 

Tags: , , , , , , ,