I have a question, but the problem is, I can't show the page right now, because it's only on my local server. I will try to explain it as good as possible.
I've got a view that makes my frontpage have the full content of my nodes. So you see a node(in this case an embeded youtube link). You can then go to the next node via "next" or to the previous one via "previous", etc. The problem I have and I don't know how to fix is:
I got a gallery below(another view), of all my nodes, so you can either click through the prev and next buttons, or click on one of the pictures in the "gallery". But when i click on the galery, it goes to the node links so lets say "site.com/node/44".
Is there a way I can go to the node/44 page and still be able to click prev and next? And moreover, can I use the Slideshow plugin by views with changing links? Because it's just says "#" in the url... Like it does with the main content when i click "prev" and "next"?
I hope you can understand what this is about :-). If not, please feel free to ask for further information.
So your explanation is a little "garbly" so here's my somewhat 'not-so-garbly' response:
Sounds like your understanding of views is a little low. Make sure you're Displaying fields in your view and not just full nodes or teasers.
Next, if your desire is to show the gallery on all the nodes of the same type, you can so by creating a block display in views and configuring that block to show up ONLY on the node type you desire.
It gets complicated when you (which appears to be your desire) want the view to start from the last point you were viewing. This will require rewriting the field (this is available via the field configure form) which contains the image. You'll have to add a parameter (probably the current nid) which can be added, hidden, then accessed as a token via the Views Fields interface as well.
I don't remember exactly how to get the view to display the current (or next) slide by default once it's clicked.. but this is probably how I'd do it:
pick up that parameter in JS / JQ and use it to find the slide you want to display... then fire the JS function needed to display the desired slide.
Related
Is it possible to elegantly do this? The idea is, a node of content type "project" has a lot of fields, its url is something like node/5. I want to show some of the fields on that page, and others on node/5/extra, kind of an "extended" page that the user only loads if he is interested in that content (lots of images, in my case, that would slow down the main node page considerably).
I tried the Display suite module, unsuccessfully (it seems it's not really meant for doing what I want). I also saw this blog post, which explains how to add a custom display mode to a content type (other than the Default and Teaser ones that come by default), but I can't get it to work the way I want to either.
I guess you could create a view having the node ID as a default argument from URL. Then you can choose which fields to show or hide
I have been trying to figure this out for days. Hope someone can help.
I am implementing a new theme for a site. I added the html to a page.tpl.php file, populated it with the appropriate variables, and it works OK so far.
It consists of a header, footer, and a left and right div. The left div successfully displays the output of the $content variable.
The right div is supposed to show a flash video followed by two images, all displayed vertically, which vary with each page. And here I'm really stuck.
How do I go about adding these?
Depending on how much you want to program you're probably going to use blocks. I you don't want to program a lot create a bunch of blocks with each image/video combo you want. If you don't mind programming you can create a block in a module with all the code necessary to pull up the right images/videos on the right page.
But the most basic way will be at /admin/build/block/add then associate the block with the right area on /admin/build/block. You can control which pages these blocks wind up on on the block edit form.
This link may be handy for you.
The first thing you need to do is add the files to each page. You can do that with CCK and filefield.
Once you have the files in the pages, you need to get them out of $content, where they'll show up by default. You can do this by turning the fields off under Display Fields in CCK.
Now that the files are no longer in $content, you need to put it in something else. Most themes have a $right region you can use for that. So put $right in your right div. You can populate $sidebar with blocks, so you need a block containing the files for the given page.
You can make this with Views. Create a new node view, add an argument for node ID, and give it a default value from the URL. This basically tells the view to look at the current node/page. Under Fields, choose "Content" and find the file fields you added with CCK. Finally, add a display of type "Block." Save.
Now you have a block with the files on the current page, and you have the $right region on every page, so just go to the Blocks admin page and put this block in that region.
Scott and Chuck have already provided the details for this question, but I thought I would just point out scenarios when each answer may be appropriate.
If you want those video and photo blocks to display on pages which are NOT node pages, then you will probably need to go with a solution similar to the answer Chuck provided.
Most likely, it sounds like you do want the the video and photos to be related to the content shown on the left. If that is the case, then Scott told you what you need to know.
One final piece to the advice from those above was the following:
"How (where) do I set it up so that the view recognizes that it is on Node 3 and displays only the images for Node 3." -- you can do this by clicking on the settings for the Nid argument in Views. Under Action to take if argument is not present: choose Provide Default Argument. In that, choose Node ID from URL
Position your block in the appropriate region (left sidebar, right sidebar etc). Make sure the visibility settings of the block are such that it only appears at paths that match node/*
Thanks, all!
How can I embed a node on the front page in Drupal 6. The node basically has the image upload field along with title and description. I want it to some how appear on the homepage alongwith a "views" which shows the uploaded images at the bottom.
What I want is to give the users an ability to create content which is right now available at .../node/photo/add. I want to somehow show this box which lets one create content i.e. upload photo with title and description on the homepage.
It's basically just an attempt at creating something like imageshack as an experiment.
I am pretty n00b when it comes to drupal so please be more descriptive.
Jukebox's solution works as a point-and-click method. If you want to do it with code, it's more like this:
create a glue module Handbook | Example Blog Post
turn it on in admin/build/modules
create a menu item using hook_menu() that will become the page
embed the node with node_view()
embed the view (blog post)
in admin/settings/site-information set your page to the
You can use the Node Blocks module to, well, turn your node into a block. This means that you can go to the /admin/build/block page and place your node in a particular region.
After installing the module, edit the Content Type of the node you want to turn into a block. Under Workflow Settings, Available As Block, choose Enable.
Now you can go to /admin/build/block and you can see some new blocks. Just choose the one you want and place it in the region of your choice. You can also configure that block's visibility settings from there as well.
If your planning on having a more complicated home page at any point in the future I'd highly recommend using Panels to do this. It will allow you to arrange your front page with views and nodes in a grid method.
Example page: http://giantcalculator.com/content/cartridge-filters
It’s very cumbersome to connect the ubercart view to a relevant content page. In the example above I have attached the view to the bottom; you can scroll down to see it. It is a tedius process though in which I have to create the view, then create a mini panel, include the view in the mini panel, then go to blocks page and add the mini panel to region (currently a region below the main content), then I have to configure the block so the view only appears on it’s one particular page.
This seems far too complicated and the particular region will soon have about 20 blocks inside it, though each only appearing on one page. Is there a better way to attach a view to its relevant content info, or vice versa?
I know the view creates a page of its own, and if I could add the content on top of the view that would be great. Or within the view itself, can the content be added somehow?
I'm almost ready to move forward with this site but I really need to find if there is a better method first. I'm posting this in a number of places and offering a $20 bounty via paypal to the first responder with best alternative that I end up using. (if there is one). Bounty may be shared if two or more people have the same response on different forums and I can't tell who was first, though when I do have an answer I'll promptly post it.
Other forums this will post include Drupal.org paid forum, Ubercart Bounty forum, aardvark, superuser and stackoverflow.
If I understand correctly, I think the piece of the puzzle you're missing is Views arguments. If you ever find yourself creating more than one view, where the only difference is the content (ie. based on taxonomy, or a certain CCK field), you probably want to use that as an argument in the view so it loads the correct content automatically.
I assume "cartridge filters" is a taxonomy term, and the page linked above is a node with this term applied. So you'd add a taxonomy arg to your view in the Views admin, and get it to pull the term from the current node. There are a bunch of tutorials out there on this, and here's a screencast: http://gotdrupal.com/videos/drupal-views-arguments
I'm also not sure why you're using mini panels. They're generally used for sets of blocks or other content to be displayed repeatedly, like a tabbed block or footer. It sounds like you just want a regular block display of the aforementioned view. You could also make this entire page a Panel.
Let's suppose I have created a view that shows some kind of stories.
But I want to show this view in a left-hand bar — not a link to the view, but the view itself.
How can I connect my new view with a fixed block position?
I want to be able to show real view data in various places on my page.
Is it possible or I am limited only to central area and links to views from menu?
Using Views 2.x for Drupal 6.x it's simple to create a block from a view. Every view has a set of 'default' settings and some number of display settings. A display can be a page, a block, a feed or anything else that creative module authors.
To make a block from your view, you just "Add Display" of type "block", override any settings that you want changed in the block (IE - display less items, just a node title, whatever). You then have a block that you can place like any other Drupal block.
edit: Answer to "Can you limit stories to ones that are tagged"? Sure thing. You just add a filter for Taxonomy terms.
Getting a view to display in a block is easy. Once you have created a view and assigned the view as a block position you simply head to blocks in your admin and you'll see the view.
Just select the block and save it. Simple.
If your view doesn't show, check your filters and that the view fields are correct. Usually if they are not showing it is something simple like selecting content published = yes.
You can create views as pages or blocks. As you're not telling exactly which Drupal/Views version you're working with, all I can tell so far is that, after you create the view, you can tell it to display as a block or as a page.
Then go to the blocks settings and set that to the position you want.