Solved

How do I get the <head> section in a Joomla site to include different java script  links depending on what page is accessed?

Posted on 2010-08-26
4
628 Views
Last Modified: 2012-05-10
I need to include different script types on different pages according to which page is accessed.

Example 1
if the following page is accessed
http://www.adelaidehillstoyota.com.au/new2/showroom/hybrid/hybrid-camry

I need that page to have the code below within the <head></head>

<script type="text/javascript" src="http://www.toyota.com.au/toyota/main/js/webtrends.js"></script>
<script type="text/javascript" src="http://www.toyota.com.au/toyota/main/js/tracking.js"></script>
<script type="text/javascript">
        webtrendsTag('Dealer', 'Hybrid-Camry-eBrochure');
</script>

Example 2
if the following page is accessed
http://www.adelaidehillstoyota.com.au/new2/showroom/passenger/aurion

I need that page to have the code below within the <head></head>

<script type="text/javascript" src="http://www.toyota.com.au/toyota/main/js/webtrends.js"></script>
<script type="text/javascript" src="http://www.toyota.com.au/toyota/main/js/tracking.js"></script>
<script type="text/javascript">
        webtrendsTag('Dealer', 'Aurion-eBrochure');
</script>

I think it needs to be done somehow using the <jdoc:include type="head" />

Hope someone can help

Kind Regards
Robin Custance
0
Comment
Question by:KoolV
  • 2
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
Rowby Goren earned 500 total points
ID: 33536844
HI Robin,

This handy little Joomla utility should do what you want:  JosTag

http://extensions.joomla.org/extensions/site-management/seo-a-metadata/5139

Check out the reviews including my review.

Then if you have questions post them here.  I think it will do what you want.

0
 

Author Closing Comment

by:KoolV
ID: 33537031
Thank You big time Rowby that so was so easy you are awesome and quick
0
 
LVL 9

Expert Comment

by:Rowby Goren
ID: 33537307
It's just amazing how many incredible utilities Joomla has.

You can thank me but we can both thank the open source geniuses who come up with these gems!

Besgt wishes,

...Rowby
0
 

Author Comment

by:KoolV
ID: 33537785
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
designing in object programming 12 77
echo paypal data on screen 5 52
Blocking submission of a web-based form 6 20
javascript: add id amounts 5 47
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
This article discusses how to create an extensible mechanism for linked drop downs.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question