Please be patient with me ... it's quite possible, that I just don't understand things yet.
I wish to create a frontpage, containing three - or maybe some more - tabs for 'about', 'disclaimer' and 'contact'. So I created those pages located at home/about, home/disclaimer and home/contact. They are published and placed on frontpage. Then I created a view, using the frontpage view coming with the views module as follows:
$view = new stdClass();
$view->name = 'Home';
$view->description = 'The CRSF frontpage view';
$view->access = array (
);
$view->view_args_php = '';
$view->page = TRUE;
$view->page_title = '';
$view->page_header = '';
$view->page_header_format = '1';
$view->page_footer = '';
$view->page_footer_format = '1';
$view->page_empty = '';
$view->page_empty_format = '1';
$view->page_type = 'node';
$view->url = 'home/frontpage';
$view->use_pager = FALSE;
$view->nodes_per_page = '10';
$view->menu = TRUE;
$view->menu_title = '';
$view->menu_tab = TRUE;
$view->menu_tab_default = FALSE;
$view->menu_tab_weight = '0';
$view->sort = array (
array (
'tablename' => 'node',
'field' => 'sticky',
'sortorder' => 'DESC',
'options' => '',
),
array (
'tablename' => 'node',
'field' => 'created',
'sortorder' => 'DESC',
'options' => 'normal',
),
);
$view->argument = array (
);
$view->field = array (
);
$view->filter = array (
array (
'tablename' => 'node',
'field' => 'promote',
'operator' => '=',
'options' => '',
'value' => '1',
),
);
$view->exposed_filter = array (
);
$view->requires = array(node);
$views[$view->name] = $view;
The frontpage is set to home/frontpage. But, there are no tabs showing up ... :/
What did I do wrong? The information in the views module manual is just not sufficient for my knowledge level.
Many thanks in advance for each kind of hint or help.
David
Comments
Comment #1
merlinofchaos commentedYea, tabs are a pain in the butt. From the looks of it, you need to set one of them as the 'default' which will create a menu entry for 'home'. It looks like home/frontpage is it. The setting is called something like menu tab default (in the export it's menu_tab_default and is currently set to FALSE).
Then you can set your default homepage to just 'home' and home/frontpage should show up there by default and have the tabs you like as well.
Comment #2
davidmh commentedFirst, thank you for your reply!
I've done as you wrote, and the view now looks like this:
I now do have a menu entry called Home, that's correct. But, there are still no tabs. Funny, but I also do have now another menu entry called directory, I do not have a clue where it did come from ... but this might be another issue.
To clarify things, here is a screenshot: http://img299.imageshack.us/img299/1041/crsfdrupalscreenshottj2.png
I will appreciate any further help.
David
Comment #3
davidmh commentedJust a wild guess ... home/about home/contact and home/disclaimer must by themselves be pages created by the views module, or just ordinary pages, created through the create content function? Just to be clear, in my case it is - maybe erroneous - the last case.
David
Comment #4
davidmh commentedAll right ... talking to myself here :)
My guess was right, and maybe that obvious to you, that you couldn't imagine, I've got this wrong ... but I did. I now created three views, pointing to the content pages I've created beforehand.
It's working now!
Many thanks, merlinofchaos, your comment just made me see it.
A nice day to all of you!
David
Comment #5
merlinofchaos commentedI'm glad you got it working!
Comment #6
(not verified) commentedComment #7
hippyrandall commentedcare to elaborate a little on how you achieved the tabs? Views and tabs have my head spinning and have as yet found a way to implement tabs on my site.
Consider me a noob. Sorry if this can be found somewhere else but I have not been able to find a walkthrough or tutorial.
Thanks,
Hippy Randall