you need to be more specific. Do you want all nodes created form this time forward to be tagged with a particualr taxonomy term? Do you just want to show a list of X nodes created in the last week? Show a list of the X most recent nodes? Apply a taxonomy term for a certain number of days then remove it?
All these things can be done (though you might have to write some code).
Thanks for your advice.
My Web front page consists of 6 taxonomies (I use taxonomy block module). Each taxonomy shows the latest 10 nodes of that category.
Among all the nodes shown on my front page, I wish the nodes created within 7 days from today be flagged as "new" at the end of the node title.
I am wondering if there is any way to achieve this? Thanks!
Yes, I'm sure it's achievable. I'm not familiar with that module, however, so I can't be very specific. You'll have to delve into how the module displays he titles
Each node object should include a timestamp of when it was created ($node->created).
I looked at the code produced by tracker module for how it marks nodes as "new" so this can re-use the same CSS class. If you'd rather have this "new" look different, obviously you'll need to change the CSS class and your style.css file.
Comments
you need to be more
you need to be more specific. Do you want all nodes created form this time forward to be tagged with a particualr taxonomy term? Do you just want to show a list of X nodes created in the last week? Show a list of the X most recent nodes? Apply a taxonomy term for a certain number of days then remove it?
All these things can be done (though you might have to write some code).
---
Work: BioRAFT
Thanks for your advice. My
Thanks for your advice.
My Web front page consists of 6 taxonomies (I use taxonomy block module). Each taxonomy shows the latest 10 nodes of that category.
Among all the nodes shown on my front page, I wish the nodes created within 7 days from today be flagged as "new" at the end of the node title.
I am wondering if there is any way to achieve this? Thanks!
Yes, I'm sure it's
Yes, I'm sure it's achievable. I'm not familiar with that module, however, so I can't be very specific. You'll have to delve into how the module displays he titles
Each node object should include a timestamp of when it was created ($node->created).
---
Work: BioRAFT
Would you please give me a
This is the code I found in the Taxonomy Block module.
Would you please tell me how to update it, or give me a code snippet how to show the title plus "New" tag.
It is really appreciated!
look at the node table-
look at the node table- there are two possible values you could use- either "created" or "changed". I'll assume "created".
So, the code is pretty easy if you rememebr that's we're working with timestamp values (# of seconds). The number of seconds in a week is 60*60*24*7.
Try something like this in your template.php file (assuming a PHPTemplate theme):
I looked at the code produced by tracker module for how it marks nodes as "new" so this can re-use the same CSS class. If you'd rather have this "new" look different, obviously you'll need to change the CSS class and your style.css file.
---
Work: BioRAFT
It works!!! Thank you very
It works!!!
Thank you very much!