Solved

Keywords from Joomla Category....sheesh!

Posted on 2013-01-29
8
243 Views
Last Modified: 2013-05-15
Hi,

I'm  using Joomla (2.5)

I have a Joomla plugin that will serve ads based on the keywords in the source.  I am using a directory component that utilizes Joomla's CORE CATEGORIES and ARTICLES as the directory tree structure..

Within the CORE Joomla you can add keywords to the source at the GLOBAL SITE CONFIG level; and at the ARTICLE level.  All you have to do is fill in the provided META fields and you are set.

Even though the CATEGORY level has the same META fields, the Developers decided that only way CATEGORY's can generate keywords from the META fields is if you publish a menu item for them......(Who develops like that?)

So, I need a custom script that I can place in the head of my template or use as an include that will pull the META DATA from which ever CATEGORY Page is being viewed and places it in the source...i.e. <meta name="keywords" content="keyword1, keyword2...

I thought this was a no brainer and I thought there might be an extension that does this but I cant find one..

Any assistance with the code would be much appreciated.

Thanks
0
Comment
Question by:Mark Harris
8 Comments
 
LVL 22

Expert Comment

by:blu
ID: 38831415
I am a little confused. Are you saying that you can get article keywords into the source, but not category keywords, unless the category is set via following a menu item? Can you give me a concrete example of what you want to see?

As to your answer about who would develope like that, Joomla is very menu oriented. It is not surprising to me that the category keywords are set when you are following a menu item.
0
 

Author Comment

by:Mark Harris
ID: 38831514
I am suppressing the Article Keywords by not using them at all.  I am not using the Site Keywords either.

The directory component I use "Reviewsforjoomla" (JReviews), uses the native category structure as the directory tree. So if I create a Cats named "Activities", "Clothing" etc, each with subcategories, JReviews uses them as the Directory it displays.  Each listing is an actual article.  The template that comes with the component configs everything like a true directory.  The problem is that it "skirts" the Menu Item requirement for Keywords at the Category level.

Activities
  |
   Bowling
  |     {articles}
  |
   Golf
  |      |
  |       Mini Golf
  |      |       {articles}
  |      |
  |       Driving Ranges
  |      |       {articles}
  |      |
  |       Courses
  |               {articles}
  |
    Skating
           {articles}


I intend to put keywords only in the Category Meta Keyword fields and display only those.  I need a script that will get the Meta Keywords of the current Category I am in and append it to the meta name tag.
0
 
LVL 13

Expert Comment

by:joomla_php
ID: 38846070
If you do a menu type of category blog, the category meta keywords will display.

Exactly what type of menu are you using?
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:Mark Harris
ID: 38863494
I won't be using a menu.
0
 
LVL 13

Expert Comment

by:joomla_php
ID: 38864489
Create a hidden menu and make a menu for the form from that. You'll need some kind of link to make the component appear.
0
 
LVL 25

Accepted Solution

by:
lenamtl earned 500 total points
ID: 39167682
0
 

Author Comment

by:Mark Harris
ID: 39167882
Thanks lenamtl. I will try that.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
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…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

808 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