Xaraya UserAPI Functions

Xaraya UserAPI Functions

Developing websites with Xaraya’s default set of module blocks is rather limited. Use Xaraya’s UserAPI functions for more flexibility.

Most Xaraya modules provide a set of user functions within the modules’ userapi folders. A module’s available blocks use these functions to provide some default functionality, but the blocks are often limited and can only be configured and used based on a set of pre-defined criteria.

If you wanted to place, say, the five most recent articles, spanning all of your configured pubtypes, somewhere on your website’s home page, you could setup an articles block from within the blocks module, sort the articles based on publication date, assign it to a group, and then call it in the page this way:

<xar:block instance="name" type="topitems" />

This works fine and is nicely functional, but what happens when down the road you have several publication types and multiple blocks for each one. It can be difficult identifying which block to place and where to place it.

Another solution is to use the same <xar:block/> tag and place a block directly without having to set one up in the configuration screens. The code below will place a block directly where you need it, and you don’t have to pre-configure it first as in the example above. Just make sure you have the right templates, center.xt for the ... Read More >

website with others
Subscribe to TechTrenchSubscribe to TechTrench | Comment Here > | No comments | 65 views | Posted: Nov 09, 2008

Posts from The Website Development Blog

Welcome to TechTrench A New Technical Communication Blog
It amazes me how outdated I let my last website become, and how for so long there was that nagging feeling that I should build a new one.
Nov 16, 2008
No comments
Archive: Website Development Technologies | 65 Views
Put Away the WYSIWYG Editor and Learn Markup
I remember the old days of trying to write HTML with Dreamweaver. I was in a constant battle with the app's design preview while trying to understand where the spacer gif should go exactly.
Nov 07, 2008
No comments
Archive: Website Development Technologies | 81 Views
PageRank Sharing Among Multiple Websites in the Same Domain
I remember when I first began hosting my own websites that I would link them together in the hopes of improving their PageRank.
Nov 06, 2008
1 comments
Archive: Website Development Technologies | 64 Views

Recently Added Software

Microsoft Office Visio 2007

Microsoft Office Visio 2007

Microsoft's widely used visual communication software that information architects and other technical communicators use on a daily basis. Available in standard or professional versions.