Simplilo (version A-07)
Developed since 2012-02-26 until 2012-09-04.
Local link texts are rendered in
html_link() (factorized with
Distinction between design and template: New config variable:
template. The current variable
design holds only the design name, what means the directory design;
template will hold the actual template file in that directory. This lets more versatile configurations. Of course
$TEMPLATE_EXT is not needed any more; it's removed.
Any page can have its own template or design: New metadata:
New addon commands in addons/if.php:
<<if_level_not_greater/>> (their block versions already existed).
User defined links con be nested (user defined links are defined by config values prefixed by link:). This means user defined links now can link other user defined links (formerly, only a real URL or a local page could be used). This enables a great flexibility.
Alternative metadata in other languages. Some fields (title, description and menu_title) can have alternatives in other languages of the site. The alternatives field names end with a period an the language code: title.es, description.eo... If an alternative field exists, it will be used when the current page is in its same language. Example: when the system creates a link in an English page (say, en.program.simplilo, pointing to a local Esperanto page (say, eo. artikolo), the engine will use the fields title.en and description.en of the Esperanto page; if they don't exist, the normal title and description will be used. This proccess is automatic; it happens whenever one of those fields is required. This makes it easier to share contents between different language sections of the same website.The tags addon provides a new addon command:
<<cached_tag_cloud/>>. It does the same than
<<tag_cloud/>>but caches its output; the cache is rewritten when the template is newer. This is useful to save processing time when the page cache cannot be used in certain pages, but there's no need to rebuild the tag cloud every time the page is visited. In order to implement this feature, the cache/addons directory has been created, as well as the correspending functions in the engine.
get_pages() creates the
$pages array with all pages in all languages. Formerly only pages in the language of the current page were added. This means all website pages in all languages will be avalaible in the pages list used by the engine. The new behaviour makes it easier to share contents between different language versions of the site. For example, a page in English can show a listing of certain pages selected from the Spanish section of the website. But this new feature may break some old code: some regular expresions (for example the first parameter of
<<toc/>>) must be adapted. To make the transition easier, the default regular expresions used by addons will filter pages in the current page's language.
Fixed silly bug in
The search query is not modified anymore by the search results function.
Three hidden bugs where discovered while doing the first changes in Simplilo (version A-08), and they were fixed also in version A-07:
is_template_newer_than_cached_page didn't added the file extension.
head_rel_link didn't call
internal_href but used just the page name as URL. This worked so far because pretty URL s (e.g. http://programandala.net/page_name) were activated, but it would fail with actual dynamic (http://programandala.net/index.php?page=page_name) or static (http://programandala.net/page_name.html) URL s.
Stupid but important bug in
last_page_name_part: The second parameter of
$page_name instead of
1! The outter
trim was unnecessary. The result was wrong.
- The deprecated
Planned features for future versions
- Metadata cache. This will improve the rendering speed.