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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
comma true 6 37
Help with PHP 13 27
What if i make webbased alternative for MS Access 5 67
Test if unique ID is in log file 5 21
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…
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…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

839 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