okay, so i create a new content type "sliderpage" and follow cck instructions etc...
i create a sliderpage with title Tab1, then another called Tab2 and then finally another called Tab3 - but on Tab3 i actually employ the other nodes as the sliders for reference
when i view the tab, it's not 'Tab1, Tab2, Tab3' in tabs - it's Tab3 with the slider "within" that node
am i doing something wrong? is there a way for it be self contained? could i omit the 'body' field for this content type? can't leave title blank for the node...i'm a bit confused...
i mean, it IS working - perfectly in terms of slider references and animations, i'm just not getting the nesting effect that i'm experiencing...any thoughts on how i might revise my workflow?
Comments
Comment #1
Mark Theunissen commentedI think you're going wrong... the new node type that you create is not a "page" within the slider, but rather the slider itself.
So your nodetype "sliderpage" should not have the "field_slider_content" nodereference field.
The pages of the slider can be any type of node, and are typically just stories or pages.
If you want one slider, you must create one "slider" node and then reference all the nodes that you want as "pages" (I prefer the term "slides").
The "slider" node type should not contain any other fields beside the "field_slider_content".
Is that clearer?
Mark
Comment #2
zilla commentedi must be missing something - when i go to create a new content type, i must at least have a title - so you do mean omit the body and leave only the nodereference field for this content type? and then leave the title blank when i create the node? activating the slider module does not appear to present me with a new content type called 'sliderpage' (etc) nor an option to generate a content type from within module settings - only the option to associate content types (or views)
Comment #3
Mark Theunissen commentedYes, you must have a title in the content type settings. So yes, you only have a title and a nodereference field named "field_slider_content".
Yes, omit the body. You could have it, but it's not needed.
No, don't leave the title blank when creating a node. Give it the name of the slider.
Let me explain by pointing to an example. Assume I wanted to create the slider that you see on the Coda page (http://www.panic.com/coda/).
1. I would create a new Slider node type, called "Slider". With only a title and a nodereference field called "field_slider_content".
2. Go to the slider admin settings page and tick the box next to this new type, "Slider".
3. Create a story node for each of my slides. So I would make one with the title "New", one called "Files" (like you see for the tabs on the slider on http://www.panic.com/coda/), etc. In each of these story node's body, I put the content that I want to appear in each slide. The title of each of these story nodes will be used as the tab title.
4. Create a new node of type "Slider". Give it a title of "Coda website front page slider".
5. In it's "field_slider_content" nodereference field, select the story nodes that I created in step (3). Just hold down the control or command key and click them so that they are all selected.
6. Submit this one node, and voila, a slider will appear...
The slider module itself does not generate content types by itself. That's why you have to do it in step 1.
Comment #4
Mark Theunissen commentedComment #5
zilla commentedyes - that all makes sense (i was reusing the 'slider content type' for each slide, as opposed to just writing a story and allowing such content types to be referenced from the slider page...
BUT in your example - per my nesting comment- wheni create the new slider called "coda website front page slider" - that title appears above the slider - is that the idea? that title functions as the name for the grouped slides and must appear?
Comment #6
Mark Theunissen commentedYes, that's the idea. It's trivial to remove the title if you like. There are two methods:
1) Make a copy of node.tpl.php called node-slider.tpl.php and remove the relevant
print $title;statement.2) In your theme CSS file, set the title to
display:none;.Comment #7
zilla commentedi think i'll go with option 1 since i DO want titles elsewhere on my site ;)
btw, what argument do i remove in node-slider.tpl.php to remove 'user picture'? (sorry, unrelated but resolves a related item!)
Comment #8
Mark Theunissen commentedYou could remove the title for Slider nodes only, just using CSS, but you'd need to be using a theme that outputs verbose classes on the body element (like the brilliant Zen theme for instance). You'd say something like:
.page-node-slider h2 .title { display: none; }
... Or something similar.
In node-slider.tpl.php, the line for the picture is:
print $pictureHope that helps!
Comment #9
zilla commentedthank you mark - this module is awesome...
any chance it will ever ship with some default styles/options that override the current theme (right now any current theme appears to override and so in my case, i get sorta ugly buttons next to each tab because it's acquia marina and they have a little graphic for "li" style used in slider tabs
Comment #10
Mark Theunissen commentedMy thinking is to style it as little as possible. We are using it on a couple of different sites, and every time we style it to match the site it's on. I don't want to have to strip out a complicated pile of stuff every time.
I know that some themes have default looks for the li element and sometimes it's strange, but I'm going to make the assumption that nobody wants to have it in it's default state, and everyone wants to customise it.
If you do make it look really good and want to share that design as a "default" design, I could easily have an admin setting that would allow the user to pick a look and feel. Feel free to contribute the CSS and I'll add it in.
Comment #11
zilla commentedthanks. would it be reasonable to put in the admin settting in an upcoming release and perhaps include a few random variations on the styling to use as a foundation/starting point? (for example, a great default could be 'coda style' with those tabs, height options et al ;)
Comment #12
Mark Theunissen commentedYeah absolutely. Send me the stuff and I'll do it. ;)
Comment #13
sskully commentedHi, I can't get it to select multiple node reference when creating my content type field. It just shows select list, check boxes/radio buttons and auto complete. Do I need to download another module?
Thanks