ez projects / novenutils

Noven Utils

UNIX name Owner Status Version Compatible with
novenutils Jérôme Vieilledent stable 1.0 4.x
Adds useful template operators to eZ Publish

This extension adds several template operators to the system :

String operators (Must be used with pipe ("|") template syntax) :

  • espace_as_entities() => Does an "htmlentities" on the given string, taking the charset used into account.
  • split_words_in_parts($maxLength) => Splits too long words and adds one or more caesura character(s).
  • shorten_to_last_word($maxLength) => Cuts a string to $length characters and then cuts at the end of the last word. Also adds "..." to the cutted string

Misc operators :

  • persistent_variable_append($key, $value, $mergeExisting=false) => Adds a value to the "persistent_variable" variable, available in node templates and in pagelayout when a node is displayed.
    See the documentation and this topic from ez forum for more info about persistent_variable.
  • server_variable($name) => Returns the $_SERVER[$name] variable
  • session_set($variable, $value) => Sets a session variable from template
  • media_url($addQuotes='yes') => Adds a Media Host to an URL (useful if you want to host your media files - ie. css, js, contrib images... - on a different hostname)
    • Define your Media Host in novenutils.ini
    • In your templates, just add "|media_url" to your media URLs
    • <link type="text/css" rel="stylesheet" href={$css|ezroot|media_url} />

No news yet.

This project has no reviews yet. Be the first one to review it!

No forum messages yet.