Placement assistance

Topics: Writing themes
Apr 17, 2013 at 10: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 10: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 18, 2013 at 12:13 AM
Apr 18, 2013 at 12:19 AM
That's perfect! Thanks so much!
Apr 18, 2013 at 12:21 AM
Anytime :)