Projector Module: Property as List Item classname

Topics: General, Writing themes
Jan 4, 2012 at 5:29 PM

Under Projector Tab (Manage Queries) > Edit Query > Edit Layout, I'm trying to add a class to the list item (under Html Properties, "Item class").
When I click the icon in the textbox, and overlay with documentation/help appears. Two things:

  1. I can't see where to close the overlay, so I'm just refreshing the page to do that right now. Might be a bug
  2. more importantly, I am trying to figure out how to add a class to the list item. When I hard code a value, it works. But I need to use one of my Properties as the class name on the item (so under Properties, it's "Field Category: Default value", and within my (even though I know I'm not using in this case), it's Field_Common_Text-Category.

What is the syntax within the textbox for adding a custom textfield?

{Fields.Common.Text-Category}  ?
{Category}   ?


Jan 4, 2012 at 5:42 PM

The first issue is resolved if you sync with the latest changes of the Tokens module. 

For inserting the value of a field, it should be {Content.Fields.YOURPART.YOURFIELDNAME}

Example: {Content.Fields.Page.MyTextField}

Jan 4, 2012 at 6:54 PM

Yes, syncing Tokens module resolved first issue. Thanks so much.

As for the second, I guess I'm not getting the "YOURPART" section. Is that the ProjectionPart? the Projection? 

I've created a Projection (Content Item) using "New Projection" that queries on a Content Type (content type id: NewsRelease). I'm lost as to what is meant by "YOURPART"/Page in your example.

I would interpret that in my case would be: {Content.Fields.NewsRelease.Category}

but this isn't working.

Jan 4, 2012 at 7:01 PM

YOURPART should be NewRelease.

Where are you putting this token exactly ?

Jan 4, 2012 at 7:15 PM

I created a new Layout under Layouts on the Edit Query screen.

I hit "Edit" for my Layout. From "Edit Layout - Html List" screen, I scroll down to Html Properties. I expand that and see List id, List class, and Item class, with textfields under each. I am putting this token into the textfield for Item class.