Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 493629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:25:26+00:00 2026-05-13T05:25:26+00:00

I’ve a problem with drupal paths in one view that I building. Right now

  • 0

I’ve a problem with drupal paths in one view that I building.
Right now my view has this form: contents/2/6.

Where 2 and 6 are the Ids of two nodes, I’d like to manipulate these ids to translate them let’s say the title of those nodes.

I can not do this from the view because I’m sending these values to a panel, and the panel MUST received the ids of the nodes.

So to sum up, I just want to rewrite (like pathauto does) these ids to title, can I do that? Is there an specific module for this?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T05:25:26+00:00Added an answer on May 13, 2026 at 5:25 am

    If I understand you correctly, you want to keep the original paths ‘content/[nid_x]/[nid_y]’, but add additional URL aliases for those with more ‘speaking’ path elements from the nodes (e.g. titles). If that is correct, you have two options:

    First, you can do it manually by defining URL aliases for ‘content/[nid_x]/[nid_y]’ under ‘admin/build/path/add’. This is easy to do, but probably not what you are looking for, if you need many of those aliases.

    Second, you can do it programmatically by means of the path_set_alias() function. Using the function is pretty straight forward – the only problem might be where to trigger it. From your description it is not clear to me where/when those views get created, so it’s hard to come up with a suggestion – maybe you can edit your question to be a bit more specific on that.

    If you want to create that view URL aliases for specific node combinations, you could try to use the ‘insert’, ‘update’ and ‘delete’ operations of hook_nodeapi() to trigger the alias creation. Obviously, this would only work if there is a coherent rule that would allow you to decide from code for which nodes to create an alias or not.

    Once you have an URL alias in place for a certain path, it will be used instead of the original one whenever a link to that path gets created via the l() function. So e.g. if you create a menu entry pointing to ‘content/2/6’, the used URL would automatically be the alias you created for that path.


    Edit: Just in case you end up creating aliases programmatically – If you use pathauto anyways, you could/should use its pathauto_cleanstring()function (from ‘pathauto.inc’) to ensure that your generated URLs are properly escaped/rewritten to allowed characters.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
this is what i have right now Drawing an RSS feed into the php,
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I am currently running into a problem where an element is coming back from
I have a French site that I want to parse, but am running into
i got an object with contents of html markup in it, for example: string
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
I have some data like this: 1 2 3 4 5 9 2 6

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.