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
627 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

914 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now