On my website, I have a big red "Special Offers" button that currently links to my special-offers View, which just lists teasers for all of our current offers. At present we only have 1 offer, and so it would be better if this link took you straight to it.
I guess the best way would be to do some preprocessing and change the link before it gets displayed on the page, but I'm not sure of the best way to do this. I could just use an SQL count query to set a variable in theme_preprocess_page(), which I then check in page.tpl.php, but is there a nea开发者_Go百科ter / more efficient / correct way to do this?
精彩评论