Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Article Manager 2:
embedded media and text wrap

 

 


floodrod
User

Nov 7, 2006, 11:08 AM

Post #1 of 3 (715 views)
Shortcut
embedded media and text wrap Can't Post

Dear staff,

When I remove the embedded media snip in my index template, the checkbox to wrap text around images becomes active. All old articles (migrated from Artman1) which displayed images no longer are wrapped by text. Only when I re-Add the embedded media are they wrapped.

If I want to take advantage of the new Embedded media options, while still keeping old article images "wrapped" by default. How can I change the New (common) image rules to automatically text wrap "ALL" images?

Thank you


Dave
Staff / Moderator


Nov 7, 2006, 12:03 PM

Post #2 of 3 (710 views)
Shortcut
Re: [floodrod] embedded media and text wrap [In reply to] Can't Post

Ok, When you use an "upload placeholder" like this ***upload1*** the software looks for a templateCell that tells it how to display it. It looks in these three places and uses the first templatecell it finds.

template: (current template), templateCell: placeholderName.embeddedMedia

template: (current template), templateCell: pageDefault.embeddedMedia

template: templates/common/embeddedMedia.html, templateCell: globalDefault.embeddedMedia

So if you want to do something different for imported records you need a way to identify them. You could use a templateIf and check for articles before a certain date. Or check for the hidden 'articleType' field which gets imported but isn't set for new articles. So say you did that. You'd have the following in the appropriate templateCell.

<!-- templateIf : $article.articleType$ eq '' -->
default formatting or image code here
<!-- /templateIf -->

<!-- templateIf : $article.articleType$ ne '' -->
formatting for imported articles here
<!-- /templateIf -->

And that is checking to see if the article type is blank (eq '') or not blank (ne '').

Hope that makes sense. Let me know if you need more details.

Dave Edis - Senior Developer
interactivetools.com
 


floodrod
User

Nov 9, 2006, 10:55 AM

Post #3 of 3 (690 views)
Shortcut
Re: [Dave] embedded media and text wrap [In reply to] Can't Post

Thanks!

I wanted to automatically wrap "ALL Images" just like AM1 did, while taking advantage of the New embedded media options. When I Open global.Default embeddedMedia, I see 2 mentions of wrap text. Ones on top, one on bottom. I simply change the value from "all" to "none" and it seems to have worked.

<!-- templateIf : $file.wrapText$ == "0" --><br clear="all"><!-- /templateIf -->

<!-- templateIf : $file.wrapText$ == "0" --><br clear="none"><!-- /templateIf -->


Now all images in bith index's and articles are automatically wrapped regardless if the "wrap text" box is checked and now I can use the auto thumbnail options Laugh