Placement assistance

Topics: Writing themes
Apr 17, 2013 at 9:13 PM
I'm trying to nest a couple of <Match> elements in my placement file to achieve a desired result, but I can't seem to get it to work.

I have the Recent Blog Posts widget in the TripelSecond zone on the default layer. I'd like to only display the title of the BlogPost in this widget. BUT...I do want to display everything else when viewing a list of BlogPosts (not in the widget).

I found that doing the following hides the information I don't want to display
    <Match ContentType="BlogPost">
      <Match DisplayType="Summary">
        <Place Parts_Common_Body_Summary="-"/>
        <Place Parts_Common_Metadata_Summary="-"/>
        <Place Parts_Comments_Count="-"/>
        <Place Parts_Tags_ShowTags="-"/>
      </Match>
    </Match>
however, that hides those items in both the widget and the regular list of BlogPosts.

I was hoping I could target the Widget ContentType by nesting like so
  <Match ContentType="Widget">
    <Match ContentType="BlogPost">
      <Match DisplayType="Summary">
        <Place Parts_Common_Body_Summary="-"/>
        <Place Parts_Common_Metadata_Summary="-"/>
        <Place Parts_Comments_Count="-"/>
        <Place Parts_Tags_ShowTags="-"/>
      </Match>
    </Match>
  </Match>
so that it only gets hidden in the Widget. Is this possible via Placement? Thanks!
Apr 17, 2013 at 9:52 PM
I was able to do it with CSS, targeting the .widget-recent-blog-posts class name along with .tags and .metadata with display: none;

I guess that will work.
Apr 17, 2013 at 11:13 PM
Apr 17, 2013 at 11:19 PM
That's perfect! Thanks so much!
Apr 17, 2013 at 11:21 PM
Anytime :)