Apple Computer Hardware manual Creating Sidebars, Understanding the Types of Sidebars, Shared Keys

Page 18

Creating Sidebars

If you haven’t created a sidebar before, it might be easier to customize an example sidebar to suit your needs.

In the wireframe theme’s theme.plist file, there is a sidebars section that contains an array of sidebars you can customize:

<key>sidebars</key>

<array>

<dict>

sidebar keys and values

</dict>

<dict>

sidebar keys and values

</dict>

</array>

Understanding the Types of Sidebars

There are several types of sidebars, each with a specific purpose and set of keys:

Sidebar Type

Description

Related Section

static

A list of URLs.

“Static Unique Keys,” on page 19

 

 

 

search

A list of search results using tag-

“Search Unique Keys,” on page 20

 

based or text-based searching.

 

 

 

 

calendar

A list of upcoming events.

“Calendar Unique Keys,” on page 21

 

 

 

tag

A list of search results using tag-

“Tag Unique Keys,” on page 22

 

based searching.

 

 

 

 

recentActivity

A list of pages sorted by recent

“Recent Activity Unique Keys,” on page 22

 

viewing frequency. Based on the

 

 

last 100 page views in a wiki, this list

 

 

displays the most-viewed page first,

 

 

followed by the next most-viewed,

 

 

and so on.

 

 

 

 

admin

A sidebar that appears automatically

Not applicable

 

if someone logs in as an admin. This

 

 

sidebar isn’t customizable.

 

 

 

 

Shared Keys

All sidebars require the following keys:

Key

Example Values

Possible Values

Optional or Required

Description

 

 

 

 

 

displayName

What’s Hot, What’s New,

Any string

Required

Name of the sidebar.

 

Useful Links, Upcoming

 

 

 

 

Events

 

 

 

 

 

 

 

 

type

search, static, calendar

static, search, calendar, tag,

Required

Type of sidebar used.

 

 

recentActivity, admin

 

 

 

 

 

 

 

uid

HotList, RecentAddsList,

Any string

Required

Identifier for the sidebar.

 

UsefulLinks

 

 

This value must be unique.

 

 

 

 

 

18

Chapter 1    Customizing How the Wiki Looks

Image 18
Contents Mac OS X Server 019-1252/2008-04-24 Contents Managing Wiki Content Getting Additional Information PrefacePreface About This Guide This chapter describes how to customize a wiki’s appearance Theme File Structure OverviewCustomizing How the Wiki Looks Variant Theme File Structure Overview Wireframe Theme File Structure Overview File or Folder Name PurposeBorders, and positioning for comment entry Terminal, enter the following commands Creating a ThemeEditing CSS Files WebsiteEditing Property List Files About Property List EditorAbout Strings About Property List FilesAbout Property List Keys and Values About DictionariesHere is an example of an array with a single string About ErrorsHere is the sidebars array in a plain text editor Here is an example of an array with multiple stringsChanging General Theme Settings Key Default Value Possible ValuesDescription Shared Keys Creating SidebarsUnderstanding the Types of Sidebars All sidebars require the following keysStatic Unique Keys Each dictionary entry has the following keysKey Example Value Possible Values Optional or Required Search Unique Keys Calendar Unique Keys Recent Activity Unique Keys Overview of the Example SidebarsTag Unique Keys Sidebar Name DescriptionUsing the Example Sidebars Terminal, enter the following commandTo comment out specific sidebars To this Adding JavaScript and XSL Files To add JavaScript files or XSL files to a themePut JavaScript .js files or XSL .xsl files in this folder About JavaScript Here are some published JavaScript guidesTopic About XSL JavaScript ExampleCreate a plain text file with the following content Viewing Dynamic XMLTo view context $ sudo serveradmin stop teams sudo serveradmin start teams Attributes Creating a Custom Whitelist About the Custom Whitelist’s Structure Allowing Specific URL ProtocolsAllowing Specific CSS Styles Allowing Specific Html Tags and Attributes To allow specific Html tags and attributesTag Attributes Built-in whitelist allows these protocols About the Built-in WhitelistProtocols Allowed in the Built-in Whitelist ProtocolBuilt-in whitelist allows these CSS styles CSS Styles Allowed in the Built-in WhitelistHtml Tags and Attributes Allowed in the Built-in Whitelist Built-in whitelist allows these Html tags and attributesNode Pre Cite Span Strong Tbody Tfoot Colspan, rowspan Thead Migrating Wiki Content From Other Websites Backing Up the Wiki ServerManaging Wiki Content Wiki File Structure Overview Manually Editing Raw Content File or Folder Name PurposeViewing a Wiki’s Administration Settings To regenerate the index after editing raw wiki contentFor more information about AtomPub, see Metadata.plist file includes the following keys Key Example Value DescriptionTo manually edit wiki administration settings Viewing a Page’s Metainformation PageuidManaging Attachments