Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > content before/after isn't View modes: 
User avatar
Member
Member
dcollins-marketwired - 1/23/2014 2:34:39 PM
   
content before/after isn't
This makes no sense.

I'm trying to limit my styling to a given piece of content - say, on my event page - so it doesn't trample the styles on all the other pages that use a zoneMain. I want all content to be specified with .event-page, so I can target .zoneMain.event-page instead of all zoneMain everywhere.

So, in zoneMain, I add some content before / content after like this:
Content before: <div class="event-page">
Content after: </div>

Now, what I would expect is this:
<div class="main">
<div class="event-page">
<div class="main-inner">
<!-- all the rest of my content -->
</div>
</div>
</div>

But what I get is this:
<div class="main">
<div class="event-page">
</div>
<div class="main-inner">
<!-- all the rest of my content -->
</div>
</div>

That is most distinctly NOT before and after. That's before and before. This is completely illogical.

User avatar
Member
Member
dcollins-marketwired - 1/23/2014 2:42:39 PM
   
RE:content before/after isn't
You know what DOES work?
Content before: <div class="event-page">
Content after: <nothing>

It happens to auto-close the div in the right place.

Makes no sense.

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 1/24/2014 6:23:55 PM
   
RE:content before/after isn't
Hello,

I wasn't able to reproduce this issue with some testing zone running hotfix 7.70.
Are you sure that your code is valid? Because our internal validator is probably trying to fix your code if there is any additional <div> lost somewhere in the code..
I would recommend you also to check your code for validation also without before/after pieces.

Best Regards,
Martin Danko

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 1/25/2014 2:26:21 PM
   
RE:content before/after isn't
As Martin mentioned it's probably invalid HTML. Have you checked your transformation code to ensure it's correct?

User avatar
Member
Member
dcollins-marketwired - 1/27/2014 8:24:53 AM
   
RE:content before/after isn't
Thanks but now that I've gotten my head around layouts, which is where I should be putting my HTML wrappers, I don't need to resolve this mystery.