Drupal 6: Creating "ON/OFF News Links" functionality for a block created with View Module.
Posted
by artmania
on Stack Overflow
See other posts from Stack Overflow
or by artmania
Published on 2010-06-14T18:39:38Z
Indexed on
2010/06/14
18:42 UTC
Read the original article
Hit count: 175
Hi friends,
I'm a drupal newbie who needs some advice...
I have a news list block at homepage, created with View Module. It is listing all added news' title and link. Everything is cool so far. Now I need to add an ON/OFF option at admin side for homepage news block. When the setting is ON, it will work as it is. When it is OFF, only the titles will be listed with no linking to news detail page.
So, now where should I add this ON/OFF option? I have only add/edit/delete pages for each news, there is no common news page to add such option. Should I create an admin page with such ON/OFF option in? Also I think I need to create a db table to keep this ON/OFF status. and controlling this value at homepage block, if it is 1 or 0, and displaying links according to db value :/
it looks too long way
- Create db table
- Create an page with ON/OFF option in
- add php codes to update db for admin's choice
- get the db value in homepage block to display links, etc.
is there any shorter, better way to do what I need?
Appreciate helps so much!!! Thanks a lot!!
© Stack Overflow or respective owner