Items in 'Graffiti Tips' ↓

How To: Use Asp.Net Web Service and Prototype to Process a Form

sample code One of the challenges in using Graffiti for a custom application is how to integrate custom functionality with the rich content management provided by native Graffiti. By using the Prototype JavaScript library in combination with a web service, you can add custom forms processing to your...

Continue reading →

Create a Simple Breadcrumb With Chalk

You can create a breadcrumb by using Chalk alone. This approach would assume that you're creating a custom view file for the category, in this case the Services category: <h1><a href='$data.GetCategory("Services").Url'>$data.GetCategory("Services").Name</a>&nbsp;>&nbsp;...

Continue reading →

Graffiti Editor Templates

I was really excited when I saw the templates button in the Posts editor, since this is a great way to give control of the post layout to the content author, yet still have some control over the html. With the help of Jamie at Telligent, I was able to find the templates. They are located in the __utility...

Continue reading →

Including A Script File For A Specific Category

If you want to include a JavaScript file for only a specific category, surround the script tag with a conditional statement based on the category name. Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0;...

Continue reading →

Getting Full Url for A Site

If you need the full url for a site for inclusion in a link or to create a source attribute for a javascript link or image link, you use this Chalk: $macros.FullUrl($urls.Home) The $macros.FullUrl converts an absolute url to a fully qualified url....

Continue reading →

Showing a Custom Field

To add a custom field in a view, include a reference to the field as: $post.CustomFieldName As an example, to include the custom field "customer" in the post view template, include: $post.Customer To prevent a null or empty mark-up associated with your custom field from being displayed, surround...

Continue reading →