Hello,
I have multiple URLs pointing to the same basic content. But each URL is for a different purpose, so I would like to be able to tweak the content of a page based on the URL that they user is visiting the content from.
So, if I have two domains:
chocolate.com and
caramel.com,
The basic content of the website will be about candy, but I want to change some of the text on the page to discuss chocolate or carmel depending on the URL that the user is visiting from.
If you might be able to help me with the code to get this set up I would appreciate it.
Comments
Comment #1
samdeskin commentedSo far this is what I've got:
The only problem is that the code appears on the page, so - so much or SEO. Also, Drupal seems to add a
on the page so it can't be used in a sentence to replace text.
Any help would be appreciated.
Comment #2
ainigma32 commentedIf you want to output Javascript in a node you will need to change the input filter for that node. See here http://drupal.org/handbook/modules/filter for some basic info on filters.
You could also consider using the PHP filter and code the dynamic words in PHP. See here http://drupal.org/node/268716 for info on enabling that filter in case you haven't already.
Please post back how that works out for you.
- Arie
Comment #3
samdeskin commentedArie, that helped a lot actually. I was having trouble placing a word in a paragraph because it wanted to put a break before and after the word. Now that break is gone!
The only other thing I am concerned about is getting the code out from inside the View Source. I need to get it out of there for SEO.
Any ideas?
Comment #4
dpearcefl commentedIs this still n active issue?
Comment #5
dpearcefl commentedNo response, so I'm going to assume this issue has been resolved.