By init on
I have to make a custom main page, that looks like this:
logo
--------------------------
main news
--------------------------
last sport news
--------------------------
last movie news
--------------------------
footer
I need 1 main news on the top of the page and last news from other topics, but drupal prints all news one by one. How to change this?
Comments
sticky
is the magic here =)
well its the most simple solution for this i think, promote all news to the frontpage and the main news becomes a sticky one
micha
sticky
But i want also static structure, where last news from all topics will be on it's place. And this structure must be only for main page. Just making news sticky is not a solution.
in this case
i would look into the front page module
...but you'll need some PHP code, I think
I'm having to set up a similar thing, ('cept I'm looking at having most recent events and stories on the neat static page, as opposed to two different types of stories)
I'm trying to get the block code from http://drupal.org/node/4587 to look presentable an a front page as oppased to a block. no luck yet at even getting the code to work under 4.5.2, and when it does, i think it will be just the titles, not the teasers and so on...
solution
Hm, i think i found a solution. I modified template.php (i use phptemplate engine), made some new variables - last_main_news, last_sport_news... and with is_front variable in page.tpl.php i print these news.
snap!
simultaneous posting.
Where did you define last_sport_news and last_main_news? in your template.php?
yes
I've added to template.php something like this:
he did this in a _phptemplate_variables() function
You can read about it in the handbook.
--
The future is so Bryght, I have to wear shades.
Ah yes, but then it just wouldn't have that personal touch
Thanks for your help, dudes, you've made my development process that leetle bit easier
Something like this?
Sounds like what you're trying to do is exactly the setup I have on the front page of my site. I did this by hacking apart the
node_page_default()function innode.module- I worked out that this is the function responsible for actually printing out the front page (assuming that your front page is/node). So if you want to change your front page, as I have (and as you want to), so that it prints out a few of the latest items grouped into taxonomy terms (instead of just the default chronological node listing), then this is the place to do it.Jeremy Epstein - GreenAsh
Jeremy Epstein - GreenAsh
yes
yes, I was need exactly what you have, but i think changing theme is better than changin module:)