nican VIP
Total posts: 392
10 Apr 2014 16:54

In cobalt to create a menu item pointing to a category you have to use the "external url" menu item type, so you have not the "page title" options to customize the title tag of the page.

I need to create menu items pointing to cobalt categopries and thsoe pages must have title tags different from the category names...

is there an easy way to do it?

thank you

Last Modified: 14 Apr 2014


pepperstreet VIP
Total posts: 3,837
10 Apr 2014 21:08

Do you want to configure and set it like for the usual page title parameter? Just a quick thought:

a.) Set page title programatically in Cobalt template

b.) Override the J! External-URL MenuItem type

  • Investigate the usual menuItem types for the code that sets the title.
  • In external-URL menuItem is a tab "link type" and parameter "Link Title Attribute". Maybe use this input and value... replace the regular page title with it.

Sergey
Total posts: 13,748
11 Apr 2014 07:15

oloccina is there an easy way to do it?

There is not build-in functionality to control category page title.


nican VIP
Total posts: 392
11 Apr 2014 09:47

thank you for the suggestions!

pepperstreet Do you want to configure and set it like for the usual page title parameter? Just a quick thought:

a.) Set page title programatically in Cobalt template

sorry, I don't understand

b.) Override the J! External-URL MenuItem type

  • Investigate the usual menuItem types for the code that sets the title.
  • In external-URL menuItem is a tab "link type" and parameter "Link Title Attribute". Maybe use this input and value... replace the regular page title with it.

I tried that but that parameter seems not to affect the page title tag even if I inserta custom value in that text box the title tag of the page is still the same as the cobalt category h1 tag

joomla_link_type_ext_url


pepperstreet VIP
Total posts: 3,837
11 Apr 2014 15:14

oloccina I tried that but that parameter seems not to affect the page title tag

Yes, you are right ;-) By default, this is just a title for the actual menu-item (the link in your menu).

I just wanted to make a suggestion to utilize it. It is rarely used, and you can already configure it in backend, thus you might use it instead. This value is available as a stored parameter, so it still requires some PHP code to retrieve it. And then override the page title with it.

Sorry, i don't do too much J! API or PHP stuff... Please, try to find some developer docs. There must be something that does the trick.


pepperstreet VIP
Total posts: 3,837
12 Apr 2014 19:31

I have tried to access and retrieve the (protected) menu params from current/active menuitem. No success, because of my limited API knowledge and the lack of easy developer infos. Does anyone know how to get menu params ($item) from template or component view?!?

In general, it is easy to get params in the menu module and its own templates... but it seems not (freely) available from other locations.

A beginning...

I managed to check the Cobalt Category context via jFactory and input, and this serves as "conditional check". So, I got the right values in my respective MenuItems and their "params"... the category view context check, but:

How to...

  • get the active menuitem,
  • how to access its "params"

in Cobalt template OR J! main template?


Another alternative (working)

FYI - I found another workaround with an extension called EASY FRONTEND SEO. It allows to set important data in frontend! It creates an additional URL check and query... but it works like a charm. The default MANUAL method: Just visit the Cobalt CATEGORY menuitem in frontend and set your title etc. It comes with ab easy backend manager and a system plugin. Check the plugin for config! The default config is o.k. but i would turn the relative URL option to YES. Actually, it can also work without the active plugin and just manage and store the infos in J! core tables... since you deal with a special external-URL menuItem which lacks the pagetitle param... i guess, you HAVE TO use the plugin to store and display the infos. As far as I can see... it works.


nican VIP
Total posts: 392
13 Apr 2014 09:36

thanks, I'll take a look at it!

Powered by Cobalt