Welcome to Elgg's documentation
This is the place to find documentation on all aspects of Elgg. If you would like to contribute your own documentation please do; we want this to be a real community effort!
Theme keywords
From Elgg Documentation
There are a series of keywords which can be inserted into your frontpage_loggedin, frontpage_loggedout and pageshell templates which will pull content from the community to the front page or shell of your site.
Core Elgg template keywords
- {{url}} The address of your site.
- {{sitename}} The name of your site.
- {{tagline}} Your site's tagline.
- {{username}} The current user's username.
- {{userfullname}} The current user's full name.
- {{populartags}} {{populartags:10}} lists the ten most popular public tags in a tag cloud with the size of the tag depending upon its popularity. A tag must be used at least twice before it appears in the tag cloud. If you don't specify a number, then {{populartags}} defaults to 20 tags.
- {{randomusers}} A list of random users who have filled in their profiles, if any exist. This is defined as people who have filled in PUBLIC biography, minibio and interests fields, as well as set a non-default icon. Each name will be linked to that person's profile. You can specify the number of randomusers to display as {{randomusers:5}}. By default, 3 random users are displayed.
- {{people:interests:foo:5}} Lists five people interested in 'foo' in a table, including their name and site picture. You can select "weblog", "file" or the name of the profile field of your choice. For example, {{people:weblog:hockey:3}} will list three people who have blog entries tagged with "hockey". {{people:town:London:7}} will list 7 people from London. In every case, the access for the item *must* be set to PUBLIC.
- {{toptags:town}} Lists the top 20 public tags of type 'town' (or select "weblog", "file" or the name of the profile field of your choice).
Note: all the content associated with the populartags, randomusers, people and toptags keywords must be public. Non public content will not appear, even if the user has the right to see it.
- {{blog:5:username}} Displays the 5 latest blog posts from whatever user you want. If you do not include a user {{blog:3}} or use the username "all", it will pull out the 3 latest posts from all blogs combined. You can also request a stripped down format using {{blog:5:username:slim}} or {{blog:5:all:slim}}. This will display the blog entries without the site pictures. If you use simply {blog}}</nowiki> it will display the last two blog posts viewable by the user.
- {{blogsummary:5:username}} - Displays the authors and titles of the 5 latest blog posts from whatever user you want. Blogsummary does not include the site picture or the blog content. If you do not include a user {{blogsummary:3}} or use the username "all", it will pull out the 3 latest posts from all blogs combined. If you use simply {blogsummary}}</nowiki> it will display the last two blog posts viewable by the user.
- {{blogexecutivesummary:5:username}} Somewhere in between blog and blogsummary. Displays the site icon, author, title and first 30 characters of blog content. If you use simply {blogexecutivesummary}}</nowiki> it will display the last two blog posts viewable by the user.
- {{pagesmenu}} Displays the site menu defined by the pages module. This is always the site-wide menu managed by the site admins even if users are allowed to create their own pages.
- {{page:pagename:username}} Displays the entire page content with the give page name and owned by the specified user. If the username is not supplied, this will display the page with the given name owned by the current user. If the username is "content", then this page is always from the site-wide page system managed by the site admins. For example, {{page:privacy.php:content}} will display the content from the standard Elgg privacy page. Note: you could use this to allow non-site-admins to put content on the front page.
- {{sysadminemail}} Displays the system administrator's email address as defined in the Site Administration area or in $CFG->sysadminemail.
Keywords mostly for the pageshell:
- {{toolbar}} - top tool bar
- {{menu}} - navigation - can be used instead of the top tool bar
- {{topmenu}} - logout, etc. - can be used instead of the top tool bar
- {{searchbox}} - standard Elgg search box
- {{metatags}} - metatags (should only be used in the page shell header section)
- {{sidebar}} - standard Elgg sidebar
- {{messageshell}} - system messages
- {{mainbody}} - main content area
- {{templatesroot}} defaults to /root_to_your_elgg/mod/template/templates unless you have changed the value of $CFG->templates_root. You can use this to refer to content in your template directory. Eg {{templatesroot}}/Default_Template/images/yourheaderimage.jpg
Template keywords defined by non-core plug-ins
This is not a comprehensive list but contains some of the more generally useful keywords provided by plug-ins.
Plug-in: siteusers
- {{siteusers:user_type:order:number:format}} Displays a row of site pictures. The user_type can be "person" or "community" depending upon whether you want to display pictures for people or Elgg communities. The order can be "rand" for a random selection or "latest" for the most recent people logged-in. The number is the number of pictures to display. The format options are "cssbased", "tablebased" or "shadow". By default, {{siteusers}} will display 5 random site pictures of people using the cssbased format.
Plugin: communitieslist
- {{listcommunities:relation:page}} Displays a list of communities where relation is "owned" (communities the user owns), "memberof" (communities the user is a member of) or "all" (all communities), and page is one or more of "profile","weblog", "forum" or "presentations". The page parameter can contain several pages separated by spaces. Eg. {{listcommunities:memberof:profile weblog}} returns a list of links to the profile and weblog pages for all the communities that the user is a member of.
Plugin: blogposts_list
- {{blogposts_list:number}} According to the author, this is a different version of {{blogexecutivesummary}} that is more compact, nicer, and easy to read.
Plug-in: blog_without
- {{blog_without:5:username}} Works the same as the {{blog}} template keyword except that it displays all the blogs *without* the one you specify. Defaults to displaying all blogs without the news blog. Can be useful for sites that want to have two blog displays - one for the news account and one for everything else.
Plug-in: sitemembers
- {{sitemembericons:4}} Displays 4 random member names and site pictures. {{sitemembericons}} defaults to 9 members.
Plug-in: sitecommunities
- {{sitecommunitiesicons:4}} Displays 4 random community names and site pictures. {{sitecommunitiesicons}} defaults to 9 communities.
Plug-in: status
- {{statusdisplay}} Displays the user's status.
Plug-in: river
- {{river}} Displays the activity report for the user's friends.
Plugin: poll
- {{current_poll}} Displays the current poll set by the system administrator.
Plugin: google_search
- {{googlesearch}} Adds a Google custom search box to search your own site.
Plugin: hot_topics
- {{hottopics:14:10:3}} Displays the first 10 blog posts that have received a minimum of 3 comments in the last 14 days. By default, {{hottopics}} displays the first 5 posts that have received more than 2 comments in the last 7 days.
Plugin: upcomingevents
- {{upcomingevents:7}} displays the most current 7 upcoming events. {{upcomingevents}} defaults to at most 10 events. Requires the calendar plugin.

