By mattso5050 on
Does anyone know if it is possible to make your blocks dynamic? Either the core blocks provided by drupal or by creating your own blocks and making those dynamic.
Any input or feedback would be greatly appreciated.
Thanks,
Mattso
Comments
Views module?
You need to be more specific on what you mean by "dynamic"
I recently discovered the "views" module and it can create blocks based on all sorts of criteria. Have a look - maybe it will fill your bill. Otherwise try to give more details.
--
http://www.baryudin.com
sorry for any ambiguity. I
sorry for any ambiguity. I have blocks that I have created on the side of my site. I would like the content to change with each refresh.
I have two scenarios in mind that would be acceptable.
1) Entire blocks change automatically. i.e. when I land on my drupal homepage, blocks 1, 2 and 3. are visible. On refreshing, blocks x, y, and z are now showing. I imagine this is close to impossible. This leads me to number two...
2) Have my custom blocks show dynamic content. For instance I have a "Forgotten Stars" block I have created. It would be great if I could get that custom block to change the star on each refresh.
Does any of this make sense?
Thanks for your help
Mattso
Should be possible
Should be possible do that with a little PHP code and a query to the datbase. If the content for "Forgotten Stars" is unique in some way this would be pretty straight forward. The key is the content needs to be unique in some way, either a unique content type, a unique taxonomy term (or terms) or unique vocabulary. For a unique type for example you can do something like
Using a different query you could also limit by taxonomy term(s), a vocabulary and other information.
Thanks
This will give me a good head start. Thanks for your help!!!
Matt