Anh TheHong giúp em về path alias

Em mới vào nghề với drupal :), em xây dựng 1 module TinTuc.
Khi em tạo 1 node TinTuc, em muốn nếu truy cập theo path TinTuc/3 thì Drupal sẽ hiển thị thông tin của node có path node/3. Em đã thử nhiều cách, ví dụ sử dụng module path, hoặc sử dụng drupal_goto thì ok, nhưng em muốn thực hiện việc alias mà không cần thông qua module path, không biết có cách nào không?
Cám ơn anh

Comments

Cho hỏi bạn sử dụng nhánh

Cho hỏi bạn sử dụng nhánh Drupal nào?

Em sử dụng D6

Em sử dụng D6

Bạn tìm hiểu 2 hàm này

Bạn tìm hiểu 2 hàm này:
- custom_url_rewrite_inbound
- custom_url_rewrite_outbound

Tôi đã làm một script tương tự ở Drupal 5:
- Chèn hậu tố .html vào tất cả các Drupal path

Vì đang quá bận rộn, tôi sẽ trở lại topic này sau.

Thế Hồng

Bạn nên xài thử module

Bạn nên xài thử module Pathauto, có tính tăng tương tự rất hay

Bạn hãy sử dụng Pathauto

Bạn hãy sử dụng Pathauto module, rất hữu ích đấy

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <sup> <br> <p> <h3>
  • Lines and paragraphs break automatically.
  • Link to content with [[some text]], where "some text" is the title of existing content or the title of a new piece of content to create. You can also link text to a different title by using [[link to this title|show this text]]. Link to outside URLs with [[http://www.example.com|some text]], or even [[http://www.example.com]].
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. The supported tag styles are: <foo>, [foo]. PHP source code can also be enclosed in <?php ... ?> or <% ... %>.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.