1

I have created a page that displays the latest news. On the right side of the page using context module i have placed a "Recent news" block (Created using views). The recent news block shows 4 recently created news. I have added a "link" field in each item to show "Read more" on the block.

I have created another page using views which displays the complete news created so far. I call this as news archive. My problem is i have to create a "To news archive" menu in the "Recent block" last line.

enter image description here

2

You have created a view for recent news. Just add a footer to the view and then implement php l() function for your menu in the global text area of the footer.

1
  • Be warned however that storing php code in database is a discouraged practice. I'm placing my answer.
    – Artur
    Jul 3 '12 at 14:35
0

You might try to use a Views theming technique.

  1. On the advanced pane of your view, click Theme information and pick one of the "Display output".
  2. Paste the php code into a blank php file and place it in the YOUR_THEME/templates directory
  3. Add the code you used at the bottom of the template or at any part of the view that suits you.
  4. Press the Rescan template files button in the Theme information dialog
0

Try the views link area module that allow you to place links in header, footer or empty text of any views.
It works exactly the same way as the link field does so it handles perfectly aliases.

Download the dev version as it provides more options like adding rel and target attributes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy