This project is read-only.

Help finding alternate name

Topics: Writing themes
Jan 18, 2013 at 5:26 AM

Hey guys,

I'm trying to create a shape alternate for the Parts_Common_Body_Summary shape, but only target it on the Recent Blog Posts widget that is sitting in FooterQuadSecond on the default layer.

I'm having trouble getting the name of the shape correctly defined:

Parts.Common.Body.Summary-BlogPost.cshtml gets me the correct shape, but I also need it to only be specific to either the FooterQuadSecond zone or the Recent Blog Posts widget.

I was looking through the documentation and I thought I could preface the shape name with Zone-FooterQuadSecond or Widget-FooterQuadSecond, but I can't seem to get that to work. Is the joining character between that and Parts.Common.Body.Summary-BlogPost.cshtml supposed to be a "-"? Are the supposed to be written as "Zone.FooterQuadSecond" or "Zone__FooterQuadSecond"?

Thanks for the clarification.

Jan 18, 2013 at 5:40 AM

Single underscores translate to dots, double underscores translate to hyphens. See

Jan 18, 2013 at 5:51 AM

So am I interpreting this correctly?

For Zone shapes:

  • Zone__[ZoneName]. (Example template: Zone-SideBar)

means I should name my shape alternate: Zone-FooterQuadSecond-Parts.Common.Body.Summary-BlogPost.cshtml ?

Jan 18, 2013 at 5:58 AM

Do you have such an alternate?

Jan 18, 2013 at 6:10 AM

Yes, but the default shape is being used, so I'm assuming I have the name incorrectly formatted.

If I name the file Parts.Common.Body.Summary-BlogPost.cshtml, it works, but it overrides not only the Summary in the Recent Blog Post Widget in FooterQuadSecond, but also the Summary when I go to a list of posts for the blog. Is it possible to target just that zone or widget using alternates?

Jan 18, 2013 at 6:22 AM

I think I might be mixing up shapes and templates. It's a bit confusing

If I put a file named Parts.Common.Body.Summary-BlogPost.cshtml in my Themes Views folder, am I creating a shape alternate or creating a template for the shape?

I think that's probably where I need to start...or maybe I should get some sleep before I work on this =) LOL

Jan 18, 2013 at 6:57 AM

What's the exact alternate name?

Jan 18, 2013 at 7:03 AM

After further scrutinizing the documentation and realizing that the zone declaration should come at the end, I named it: 


it still doesn't get used though. I also tried:


to get and Common Body Summary in that zone...still uses the default though

Jan 18, 2013 at 7:29 AM

What is the exact name of the alternate?

Jan 18, 2013 at 4:19 PM

I'm not sure I'm totally understanding what you mean by the name of the alternate. I thought the alternate is what I name the file in my Theme folder that is overriding the original. Am I understanding that wrong?

If the original shape is Parts.Common.Body.Summary.cshtml in \Core\Common\Views, is the alternate the one I place in my Theme's Views folder? If I keep the original name, it will override that shape on the entire site, but if I modify the name, I can target where it overrides. So adding "-BlogPost" at the end will target that shape when being used for the BlogPost content. I thought the documentation indicated I could also target a Zone or Widget as well using the same method.

The documentation is great, I just don't think I'm understanding it the way it's intended. Can you give me the "Alternates for Dummies" version =) LOL

Jan 18, 2013 at 7:27 PM

No, alternates are additional names for a shape. They are created from code. Those additional names are then compared with available file names and if there is a match, the file gets used to render the shape.

You can't just make up a file name and hope it works. You need to create the file with a name that corresponds to an existing alternate. You can see the list of available alternates in shape tracing. If the alternate you want is not there, you can write some code to add it, or add a module that does it for you.

Jan 18, 2013 at 10:28 PM

Gotcha...yep, I was totally off on my understanding of how that worked. I think I got it now =) Thanks a bunch!