I'd say that's probably occurring because by using ^maxwords, you're cutting off the closing DIV tags in your content which malforms your HTML.
I'd suggest to try and restructure your markup in such a way so that the asset listing in which you print with ^maxwords strictly only contains text content (with no HTML tags).
Thanks Dan, I tried modifying the asset listing by creating multiple divs so that I have separate div for my html above and below and then using a raw html div for the %asset_contents^maxwords:xx% (ensuring there is no other html at all in this div.
I am guessing this is not quite what you meant? (it didn't work).
As far as having an asset listing without any html at all not quite sure how to go about this!?
Is this behaviour expected? Things work fine if I am use keyword modifyers on metadata instead of asset_contents for example.
[quote]
Thanks Dan, I tried modifying the asset listing by creating multiple divs so that I have separate div for my html above and below and then using a raw html div for the %asset_contents^maxwords:xx% (ensuring there is no other html at all in this div.
I am guessing this is not quite what you meant? (it didn't work).
As far as having an asset listing without any html at all not quite sure how to go about this!?
Is this behaviour expected? Things work fine if I am use keyword modifyers on metadata instead of asset_contents for example.
[/quote]
Asset contents is going to be everything from an asset that is listed with an asset listing. So, even if you created a div above and below, that is not really going to matter. It is still going to truncate your html, because that is what you are telling it to do.
I think in this case, you might want to use something like jQuery, that can truncate the text INSIDE your html, rather than the entire html string itself.
Do you have to use asset contents? What kind of asset are you listing?
[quote]
Asset contents is going to be everything from an asset that is listed with an asset listing. So, even if you created a div above and below, that is not really going to matter. It is still going to truncate your html, because that is what you are telling it to do.
I think in this case, you might want to use something like jQuery, that can truncate the text INSIDE your html, rather than the entire html string itself.
Do you have to use asset contents? What kind of asset are you listing?
[/quote]
Sounds like I have misunderstoon asset_contents then - I thought it was just the text content of an asset. What I am trying to do is have standard pages (which I am using as featured articles for a news type site) and have an asset listing on the home page which displays summaries of each featured article. So I really just want to truncate the default div content for each standard page but it is sounding like asset_contents includes much more than that.
My current workaround is an article summary metadata field which works fine (although a little more effort needed creating articles) unless there is a better way I have missed?