Part of the EllisLab Network
   
 
ciHeader: The Ultimate Header and Asset Library
Posted: 21 October 2009 07:10 AM   [ Ignore ]  
Summer Student
Avatar
Total Posts:  15
Joined  08-10-2009

I’ve been working on a Library that’s saving me a lot of time and effort on dealing with the usual <header></header> tags and Assets.

I wont release this if there’s no one interested on this, so I’ll just show a example:

// Set Everything with one call (optional, you can do it vía $this->setSomething)
$this->header->set(array('title' => 'My Test Website with Persistent Title',
        
'description' => "This is just an example of what I'm working on this
        is going to be a uber long text just to demonstrate that's going to
        cut after 150 characters long... This is over 9000 :D"
,
        
'keywords' => 'keywords example for my example',
        
'canonical' => 'example/main',
        
'next'      => 'main/next',
        
'start'     => 'example',
        
'js'        => 'js:jquery, first.js, second.js',
        
'css'       => 'first.css, second.css'
        
));
// Echo the Output wherever you want
echo $this->header->output(); 

As you can see this header library has an asset manager built in. With combine, minify, library loading and cache features. In this example JS is just minified and css is combined.

 

With that code you’ll generate the following HTML:

<title>My Test Website with Persistent Title Exolimpo.com</title>
<
meta content='This is just an example of what Im working on this is going to be a uber long text just to demonstrate thats going to cut after ' name='description'/>
<
meta content='keywords, example, for, my, example' name='keywords'/>
<
link href='http://exolimpo.com/example/main' rel='canonical'/>
<
link href='http://exolimpo.com/main/next' rel='next'/>
<
link href='http://exolimpo.com/example' rel='start'/>
<
script src='http://s1.exoimgs.com/scripts/cache/c57984a9b03d4ab4c534e5752bde0f59.js' type='text/javascript'></script>
<script src='http://s1.exoimgs.com/scripts/cache/73cffc740f751bf47766ff7fc5ababc2.js' type='text/javascript'></script>
<script src='http://s1.exoimgs.com/scripts/cache/8d142ded4dde5bda1aff4a8b7ad01e3a.js' type='text/javascript'></script>
<link type='text/css' rel='stylesheet' href='http://s1.exoimgs.com/styles/cache/f9a6aa2be8bff8b2e79f9258d1ab266d.css' />
<
link href='http://s1.exoimgs.com/styles/images/favicon.ico' rel='shortcut icon' type='image/x-icon'/>
<
link href='http://s1.exoimgs.com/styles/images/favicon.ico' rel='icon' type='image/png'/>
<
meta content='G+u5HQrxBNMZdycW44VDJyVAMqhSnRmNJncf7JvJeIQ=' name='verify-v1'/>
<
meta content='99DFE9E6665041A398B0A0389F4A8128' name='msvalidate.01'/>
<
meta content='fa3f796d6bc99888' name='y_key'/> 

As you can see Persistent Titles are optional. Assets are handled by explicit call or by automatic generation like the verification codes for search engines, there are more <header></header> stuff this library can do but I guess this is enough to show what the library does.

So.. Anyone interested?

Profile
 
 
Posted: 21 October 2009 02:30 PM   [ Ignore ]   [ # 1 ]  
Summer Student
Total Posts:  11
Joined  09-24-2008

I’m interested.
Regards

 Signature 

Piese auto Al Padrino

Profile
 
 
Posted: 23 October 2009 10:51 AM   [ Ignore ]   [ # 2 ]  
Summer Student
Avatar
Total Posts:  28
Joined  03-09-2007

That looks pretty cool! Would definitely be interested in seeing some more. Thanks.

 Signature 

-
Joseph Marinaccio
.(JavaScript must be enabled to view this email address) | web dev

Profile
 
 
Posted: 24 October 2009 02:38 PM   [ Ignore ]   [ # 3 ]  
Lab Assistant
RankRank
Total Posts:  175
Joined  12-27-2008

Definitely interested!

 Signature 

Greetings from Denmark!

Profile