0

I have main navigation menu with root menu items. A request is that one of those have links to latest 4 nodes of a certain content type. So for example if I have a structure similar to this:

-Parent item:

  • child item 4

  • child item 3

  • child item 2

  • child item 1

(All child items are all of the same content type, for example Article)

When a user adds a new node of the content type Article, the structure should be the following:

-Parent item:

  • child item 5

  • child item 4

  • child item 3

  • child item 2

All I can think of is to use Views to make a list of linked titles in a block and then to attach the block to the menu (i'm using TB Mega Menu which allows this). The solely problem with this approach is that I then don't have trail of active menu items in menu.

Any ideas?

Thanks.

2 Answers 2

0

Make the URLs static; have the content of those URLs change

You were on the right track with views. But don't use it to create a block with the links, use it to create a page that displays the full rendered entity of the last node of your content type. You can give it a URL like /latest-article.

You could get fancy and use contextual arguments to display the 2nd, 3rd, ... offsets (e.g. /latest-article/%) or you could just add four more displays to the view, each with the offset bumped up by one.

0

First, in the you can choose what menu and what parent should those links go . That way, all the new links should appear where you wish.

menu settings for a given content type

Then, using Rules and Menu Rules you can make disappear the oldest menu link when you add a new one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.