Welcome Guest, Not a member yet? Register   Sign In
Powerful Theme helper to separate common views from themes
#3

[eluser]Blaze Boy[/eluser]
Theme Helper
Loading this Helper
to load this helper use the code below
Code:
$this->load->helper('theme');
Code:
theme_load( $file, $vars = array(), $return = TRUE)
loads a theme file from the current theme directory and return the output by default
Code:
theme_set( $theme )
change the current theme the $theme
Code:
theme_img( $src, $theme=TRUE )
like the img from HTML helper , but the default behaviour is that consider the image path ($src) is relative to current theme, if relative to the sire root put $theme=FALSE
Code:
theme_url( $themefile='' )
generate a url to a file in theme directory (could be used for javascripts or css file if needed, or for image file or flash file path).
Code:
theme_title( $title='html' )
get the page title tag if you set title=html, the other value permited it 'text' this will return the title only without the <title> tags
Code:
theme_sitename( $sitename )
set the site name or get it if $sitename is not specified.
Code:
theme_pagetitle( $pagetitle )
set page title (page name only with out site name ), or get it if $pagetitle not specified
Code:
theme_add( $input, $theme=TRUE )
add a js,css required files to the theme, $input is an array or nest
Code:
theme_doctype()

return the doctype line

Code:
theme_meta( $input )

add or return the meta block, you can use it to add the doctype line above your theme main style file

Code:
theme_css( $input, $theme=TRUE )
add a css file or return the css block for your theme

Code:
theme_js( $input, $theme=TRUE )
add a javascript file or block or returns the javascript block

Code:
theme_head()
return the whole head of the page (meta+title+css+charset+js)

Code:
theme_foot()
return the foot of page (if javascript at foot is true from the config file) this will return the javascript block


Messages In This Thread
Powerful Theme helper to separate common views from themes - by El Forum - 01-18-2010, 08:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB