Jonathon 255 Posted February 6, 2013 Report Share Posted February 6, 2013 Hi, I'm going to have some rotating banners on some of my pages. As they are only on some of my pages I didn't want to include this in my layout. I thought placing them in a clip would be a good idea and then just rendering them in the view file. Is it? Quote Link to post Share on other sites
Larry 428 Posted February 7, 2013 Report Share Posted February 7, 2013 I think of clips as being better for dynamic content that could change that you'd want to create in one place (i.e., a controller) and use in a view. With banner ads, you probably have static HTML that should just go in a layout file and then you would change the layout file used when necessary. Don't you think? Quote Link to post Share on other sites
Jonathon 255 Posted February 7, 2013 Author Report Share Posted February 7, 2013 Well it is currently in my layout file. I just thought it would be cleaner HTML wise in the view to call it from another place as it's not going to be used on every page. I'll keep it where it is. I did read that clips were more appropriate for dynamic content. Thanks for getting back to me Jonathon Quote Link to post Share on other sites
Antonio Conte 426 Posted February 7, 2013 Report Share Posted February 7, 2013 Maybe a widget makes more sense then? Quote Link to post Share on other sites
Jonathon 255 Posted February 7, 2013 Author Report Share Posted February 7, 2013 Yes possibly. In that case I'll await Chapter 12 of Larry's book Quote Link to post Share on other sites
Larry 428 Posted February 8, 2013 Report Share Posted February 8, 2013 No, definitely not a widget. You're just talking about some static HTML, so no clip or widget is necessary. Depending upon the site, I would either create a second layout that has the banner or use renderPartial() for it. Quote Link to post Share on other sites
Antonio Conte 426 Posted February 8, 2013 Report Share Posted February 8, 2013 It really depends on wheter your banners are static or not. In my experience, adds and banners are randomized, switched out and managed by a solution. Creating a widget for such tasks make completly sense to me because of these reasons. Clips may be an even better solution for this, but I haven't really looked into their purpose yet, so that's not something I can really judge. However, I think a widget does make sense if you want more than one static banners. Quote Link to post Share on other sites
Larry 428 Posted February 8, 2013 Report Share Posted February 8, 2013 I can appreciate what you mean and it's been a long time since I've done anything with widgets and banners, but my recollection is that they use static HTML and JavaScript and the service that provides the ads is randomizing and switching the actual ads served. I could be wrong on that, though. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.