The other day on our lab list, there was a question about adding a scrolling "latest news" box. One suggestion was to add HTML into a node's body, with full HTML turned on.
Although that is a good direction, Allie had a better direction:
Actually, we like to stay away from dropping too much functionality/HTML into content items if we can. It makes things trickier to debug, less consistent, and a challenge to update.
In this particular case, the item in question is a list of "Latest News" items. We all know how to build views, and a "latest news" view is cake! When you go to build a view, you can choose how you'd like it to appear. You can choose from teasers, tables, or even "unformatted", which wraps all of the results in individual divs. You can also install modules which provide different "style plugins" to provide additional options.
From here, you've got a few choices to make your 'latest news' items scoll by:
1) Find and install a views style plugin module that makes your results appear how you'd like.
2) Take the output that's already provided by "unformatted" ( or another existing output ) and write some CSS/JavaScript code to show it yourself.
3) Update the template that applies to that view ( click on "Theme: information" in the view configuration for details ). Add your HTML/JavaScript there.
We can help further of course, but it helps to understand *how* things are done, structurally. The default answer to "Can Drupal...?" is almost always "yes".
Thanks!
Allie


Comments
Post new comment