Hi,

I have the following request. I would like to be able to use a node as template with arguments which will be filled through the url-arguments.

I thought about tokens, tags, but haven't been able to get to the bottom of it, so that's why I place a forum-item instead of a issue by a module.

My case is getting for example a node template through the url: www.example.com/India/Nepal/flight

1) Node-title
The node-title can't be touched by your module or Reptags, so I think I have to get to the node-title through the automatic nodetitle module (http://drupal.org/project/auto_nodetitle).

2) Vocabulary/terms
What I would like is to set up a vocabulary: From, set up another vocabulary To, and set up a third vocabulary: Subject.
Inside the node-body and possible cck fields I would like to be able to use these termnames from the terms inside these vocabularies.
Say Vocabulary From term: India, Vocabulary To term: Nepal, Vocabulary Subject term: flight
The url of the node would be: a term from From/a term from To/ a term from Subject.
So in this case it will be www.example.com/India/Nepal/flight
I will try to get to these url's through pathauto ==> Any remarks on this absolutely appreciated.

3) Getting from the terms to the Tags
The url is: www.example.com/India/Nepal/flight/himalaya
The node-title is hopefully possible to make India-Nepal-flight-himalaya (through autonodetitle or other module?)

Then I would like to use the url-arguments India, Nepal and flight as tags within the body content.
SO I would like to make ONE node with these tags inside:

The [tag3]{flight} from [tag1]{India} to [tag2]{Nepal} shows the [tag4]{himalaya}

Within {} the results because of the arguments in the url.

This way there is a filled taxonomy, only One node which is a node-template, and related to the url as many pages as url's inside my site.

Could anyone help me what modules I should use with this?

Thanks a lot for your reply in advance!

greetings,
Martijn

Comments

dman’s picture

First, it's easy to set title with drupal_set_title().
Second, to retrieve the args you can access the global $q variable. See also http://api.drupal.org/api/function/arg/6

But I can't see where you are getting your data from or if the information is generated or entered. One way or the other, you will be wanting to put this logic into a module. Whether it's one that answers all those requests (you will probably have to prefix your path as /info/India/Nepal/flight to avoid conflicts) or if you have a special node type that auto-sets the path you want.
Something could be done within a tpl, but it would probably be the wrong place.

It's a bit of a challenge, but the tools are there if you start looking at other modules that do similar things.

.dan.
if you are asking a question you think should be documented, please provide a link to the handbook where you think the answer should be found.
| http://www.coders.co.nz/ |

Summit’s picture

Hi Dan,

Thanks for your quick reply! See also my userrequest on reptags: http://drupal.org/node/338670

Answering your questions:
The data from the url would be generated through pathauto I think, right?
I am thinking to start with building a vocabulary with hierarchy like:

From
--To
----Subject
-------Viewpoint
This way pathauto will already generate aliases like /India/Nepal/flight/himalaya

Then I thought of using this taxonomy/term alias and use panels taxonomy/term override to be able to place also the node-template in as a add-on node.

The node-template (a simple node with may be reptags inside..) will be added to the panels taxonomy/term override.
This way with every taxonomy-term display the reptags inside..will show the wanted content

The problem is getting the reptags in working ok I think.
Or do you have the suggestion to build a complete new module for this, and if so, how do I start as not hardcore programmer?
Are you willing with helping to get there url-alias reptags working, so I mean reptag for every url-argument like view does with argument handling $arg[1] etc..?

Greetings,
Martijn

dman’s picture

I still don't see where you get the content.
Having an URL, and a page which tells you what the URL was, is just an empty function.
But if you made a page which contained information, then the URL and the title would be made from that information - not the other way around. Don't make pages from URLs, make URLs from pages.
I don't see a good reason to automatically make empty pages with nothing but a title. That just messes up searches badly.

You need to describe where your input comes from, not just labels.

.dan.
if you are asking a question you think should be documented, please provide a link to the handbook where you think the answer should be found.
| http://www.coders.co.nz/ |

Summit’s picture

Hi Dan,

I would like to build content from a node. The node is a sort of template with filling, for example:

My dream:
Nodetitle: [tag1]/[tag2]/[tag3]/[tag4]

In the node-body

The [tag3] from [tag1] to [tag2] shows the [tag4]

So the static content is: The .. from .. to .. shows the ..

The [tag] filling, I am open to suggestions how to get this done please?
Are you suggestion I would need to do this differently, please I am open for your thinking about this?
It would be great if the term-description of some terms would also be possible in the node-template anywhere..
May be the node-template is a bad idea and you have thoughts about an alternative?

greetings,
Martijn