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
626 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
Comment Utility
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
Comment Utility
Thank You big time Rowby that so was so easy you are awesome and quick
0
 
LVL 9

Expert Comment

by:Rowby Goren
Comment Utility
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
Comment Utility
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

763 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

12 Experts available now in Live!

Get 1:1 Help Now