in the panel context from existing (single)nodes? what do i put in there to retrieve only one node content, query from the latest, eg: the first latest, or the second latest or the third and so on.
Also how to do so with the views module?
if you just want to show latest first, second and third node content in different areas of your page what you would do is create 3 different displays in a new view -
first latest node content block
order by post data DESC and in your block under Basic Settings > Items per page > change limit to 1 and leave offset at 0
second latest node content block
order by post data DESC and in your block under Basic Settings > Items per page > change limit to 1 and leave offset at 1
third latest node content block
order by post data DESC and in your block under Basic Settings > Items per page > change limit to 1 and leave offset at 2
this should work fine - might not be best way to go about it but will give you what you want - also don't forget the rest of your filters such as node type. etc
Related
I created new content type and it has 2 new fields (one is input, other select - drop-down), semantically related one to other. So I want to position them in the same row on node edit page. I tried to use groups to achieve that, but anything I've tried does not give me what I want. Tried "Horizontal tab" group with 2 fields in it. Tried 2 "Horizontal tab" groups next to each other with one field in each. Nothing helps.
Is it possible at all and if yes how to place 2 fields in the same row on node edit (back-end with standard back-end theme) page?
I would prefer to avoid CSS tweaks of admin theme. Hopefully those field groups could do the job, with some specific settings?
Update:
#MilanG As you are using field_group module already what you can do is, create a div field_group add your desired fields to it and give that field group class container-inline which will show those two fields inline. Just tried it on my local drupal 7 site and works perfect!
I m using drupal 7 for my project. I created 2 blocks in lower region.
Block name "Testimonials - home page" Another Block name "Video - home page".
The order was correct yesterday. But today Both blocks got swapped. It showing Video block first then Testimonial second.
Since i m new to drupal system, can you suggest to how fix the right order permanently.
It may be because the two blocks have the same weight (position number). To check this go to admin/structure/blocks and click "Show row weights" at the top right. If they both have the same number in the drop-down, change one of them - the lower the number block will appear first.
I am currently building a site on Drupal and I am struggling to work out how to have some parent content (that is created through a custom content type) and some child content that is created through a different custom content type, is this even possibe?
The outcome would be to have some output that would look like this?
Service Number 1
Product Number 1
Product Number 2
Product Number 3
Service Number 2
Product Number 4
Product Number 5
Service Number 3
Service Number 4
Service Number 5
Product Number 6
Product Number 7
From the list example above you can see that I am wanting to create a nested list that will form some navigation. I have a content type called "Services" set up and a content type called "poducts" also created, but I see no way of linking products to services.
Should I even be using custom content types for this? Or would better way to do be go down the route of using taxonomies? If that were the case how can I make a taxonomy link to a product or service page, and not it's own taxonomy page?
I feel like I talk complete nonsense, essestially I cannot work out an uncomplicated way to create a nested navigation in Drupal.
We get requests for sites structured like this all the time. A combination of these modules always does the trick for me:
Node Hierarchy
Menu Block
Menu Trail by Path (optional)
You can use Entity Reference module for this.
Create the two content types: 'Services' and 'Products' and in Products (child) content type, add a mandatory "Entity Reference" field that references to a Services' node (parent).
I want to display a different set of 2 or 3 images in a block on each page. So far, I have:
Added images to each page using CCK and filefield.
Removed the images from $content.
Created a view with node ID (Nid) as the argument, and added the field created with CCK, and added display type of Block.
When I try the Live Preview, it will display all the images for all pages in the block. When I enter the Node ID variable, it adds a where clause to the sql query and displays the correct images for that page.
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.
Thanks
John
"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/*
I have a Block created by a View that outputs the 5 latest posts in the sidebar. For each of those nodes, the Block contains the title of the post and the posted date.
Just for the first of those posts I'd like to display more information: taxonomy terms, author name and comment count.
In my View I can send all those fields to the Block, but now I'm wondering: How can I make those fields display JUST for the first post?
The .tpl file that displays this content gets called in a loop, so in there I'm not able to put a counter that tracks whether we're at the first post or post 2 - 5.
What is the best way to go about this?
This is what Views attachments are for. Create an attachment display type with the extra fields and a limit of 1, and attach it to the main view. Give the main view an offset of 1 and you should be all set...