Hi Mark,
First, thanks for the awesome work bringing Slider to Drupal! I looked around on the Issue sections for people with similar questions but I have a feeling maybe everyone already knows the answer. If apologise if I am asking in the wrong place.
I am have successfully created a slider as detailed but not sure how I can theme it in order for the slider appear on the front page. I have tried to use Views to create a single block that returns the slider but found it only returned the node referenced nodes rather than the slider.
I am using Zen themes and looking to basically create front page from "block" views and not sure how I can get the slider to appear. Can you point me in the right direction?
Comments
Comment #1
Mark Theunissen commentedYou can set your site's front page to be the node that you want, at /admin/settings/site-information.
Otherwise, use the PHP function node_view() or use http://drupal.org/project/reptag to add the node into the body of another node.
Comment #2
mojipittan commentedMany thanks, I will give it a bash!
Comment #3
mojipittan commentedI tried looking for more information for the method using PHP function node_view() and the best info I found was http://api.drupal.org/api/function/node_view/6
I tried to add the following code into the area I want it to appear:
48 being the node id for the slider that I have created (www.example.com/node/48/). But doesn't bring the node into the page. Is this the normal way to reference a node?
Comment #4
Mark Theunissen commentedNope, that's wrong in many ways. Try this:
<?php print node_view(node_load(48), FALSE, FALSE, FALSE); ?>Comment #5
mojipittan commentedthanks for the suggestion, this brings the individual slides one after rather than have the slider houses the slides. This is also the problem I had when I tried to use View to pull the slider out into a block. will I have to include some code to reference the slider module?
Comment #6
Mark Theunissen commentedIf that doesn't work, just set the site's front page to be the Slider node. Add your other customisations in manually, instead of adding the slider in manually...
Comment #7
mojipittan commentedbecause the node will be generated as a using node-slider.tpl.php I can edit and control that, but then I will have to find a way to customise the page.tpl.php that will end up being called when it is displayed.....
I'm not sure how to proceed in this case, am I going about this the wrong way?
Also, is it possible to put the slider into a block using Views without returning the individual slides?
Comment #8
Mark Theunissen commentedYou can override a page template for an individual node with a template for just that node. I think the syntax is page-node-xx.tpl.php
Not sure about the view block, just try it.
Comment #9
mojipittan commentedThanks for the help. I think I'll put this on hold for now. I am kind of curious though how other people have implemented the slider to their site other than on a frontpage that is.
Comment #10
Mark Theunissen commentedOk I'll close it, reopen when you need to.