darkhoros VIP
Total posts: 152
26 May 2016 09:36

Hi, I have read almost all related docs and forum posts regarding this issue, but I am unable to apply the setup.

Lets say I have these pre-created filter urls : http://{siteurl}/index.php?option=com_cobalt&task=records.filter&section_id=4&Itemid=101&filter_name[0]=filter_tag&filter_val[0]=59

http://{siteurl}/index.php?option=com_cobalt&task=records.filter&section_id=4&Itemid=101&filter_name[0]=filter_tag&filter_val[0]=34

http://{siteurl}/index.php?option=com_cobalt&task=records.filter&section_id=4&Itemid=101&filter_name[0]=filter_tag&filter_val[0]=55

If you notice all these 3 example url filters my records based on TAGs ID, which is great, the problem is these pages although have diffrent content they have only 1 single sef url that search engines will index and that is

http://{siteurl}/en/Menu_item_alias/items/4-section_alias

Which is not good for indexing, my question is how to add the TAGs filter value to the URL to make it unige.

Lets say TAG ID 59 = "text1", TAG ID 34 = "text2", TAG ID 55 = "text3"

I need the sef URL that is generated to be indexed to look somthing like this:

http://{siteurl}/en/Menu_item_alias/text1/items/4-section_alias ---> for filters using TAG ID 59 http://{siteurl}/en/Menu_item_alias/text2/items/4-section_alias ---> for filters using TAG ID 34 http://{siteurl}/en/Menu_item_alias/text3/items/4-section_alias ---> for filters using TAG ID 55

And to make thing cleaner if possible remove the section_alias from the URL aswell to look like this

http://{siteurl}/en/Menu_item_alias/text3/items/4

Is that possible, from my readings I know it is possible to do by editing router.php and Main_router.php

But I am unable to gifure it out.

Thank you for taking the time to read this. regards.

Last Modified: 29 Mar 2017


jimie VIP
Total posts: 531
26 May 2016 10:46

Heya,

Sergey promised that urls for filters will be available with Cobalt9, I'm also waiting that :)

My suggestion for urls will be:

www.domain.com/section/filter-name1/filter-name2/filter-nameetc/

Rgds


darkhoros VIP
Total posts: 152
26 May 2016 13:20

Hi, Thank you for your reply, but I have finished my project on cobalt 8 and I don't think upgrading to cobalt 9 will be smooth, so I have to get this done on cobalt 8, I hope someone can help me on this task. Thank you.


Sergey
Total posts: 13,748
26 May 2016 15:53

This is not a trivial task. Unfortunately from my side, I'll not be able to ad it to Cobalt 8. Filters in Cobalt are based on Joomla API. Every Joomla model JModel have special methods for that. So it is completely different concept and it is hard to change.


darkhoros VIP
Total posts: 152
26 May 2016 17:42

Hi, unfortunately jimie took this post out of context with his comment. I dont need to add any thing to cobalt 8, my post is not any feature request.

I just need to know how to add the part I talked about in my initial post, I just need to know where to edit and what to edit to get it done.

I hope to get reply to the initial post rather than any other posts.

Thank you.


darkhoros VIP
Total posts: 152
28 May 2016 10:50

Hi, I hope some one can point out the way for me regardin gthis issue. Thank you.


darkhoros VIP
Total posts: 152
29 May 2016 09:19

Hi, Ok I am getting some where now

I am using this code

function CobaltParseRoute($segments)
{
    $vars         = array();
    $filter       = JFilterInput::getInstance();
    $count        = count($segments);
    $last_segment = count($segments) - 1;
    switch(urldecode(str_replace(':', '-', $segments[0])))
    {
        //etc
                case 'filter':
                        $vars['task'] = 'records.filter';
                        $vars['section_id'] = '4';
//$vars['section_id'] = $filter->clean($segments[1], 'INT');
                        $vars['filter_name'][] = 'filter_type';
                        $vars['filter_val'][] = end($segments);
                        break;
    }
}

Now when I type this url to the browser

http://www.mydomain.com/en/section-content/filter/8

I am getting the filtered results, depending on the number at the end of the URL i am getting the filter to get the type I need, the problem is the URL changes to

http://www.mydomain.com/en/section-content/items/4-section-alias

Well, I need to keep the first URL as is so I can get it indexed.

I tried to change

$vars['task'] = 'records.filter'; to $vars['view'] = 'records';

I get to keep the URL but filter is not applied, ANY input is appriciated.

Thank you.


darkhoros VIP
Total posts: 152
29 May 2016 09:32

Hi, I am having very hard time formating my last post, I am unable to format codeblock, can you please help me format this. Thank you.


darkhoros VIP
Total posts: 152
03 Jun 2016 20:32

Hi, I am interested in financing this task if some one is willing to do it, I will be glad to know how much this may cost, and if in my range I will be more than happy to finance this for the community.

Hoping to hear from someone interested in this.

Thank you.


Sergey
Total posts: 13,748
05 Jun 2016 14:24

darkhoros the problem is the URL changes to...

Unfortunately it is almost impossible to change. The prefilter URL cannot display record. There is no vew attached to that URL. It only set filters to user state. So if you use view=records you see records byt filters will not be set since task to set filters is not executed.

Cobalt filters based on Joomla filter API. And this is the generald concept how it works. I am not sure that even with financing you can change this. It will require to change whall architecture how filters works. Heavy refactor.

darkhoros Hi, I am having very hard time formating my last post, I am unable to format codeblock, can you please help me format this.

This is markdown. Edit your post to see what I did. Or read this.


pepperstreet VIP
Total posts: 3,837
07 Jun 2016 00:53

darkhoros I need the sef URL that is generated to be indexed to look somthing like this: http://{siteurl}/en/Menu_item_alias/text1/items/4-section_alias ---> for filters using TAG ID 59 http://{siteurl}/en/Menu_item_alias/text2/items/4-section_alias ---> for filters using TAG ID 34 http://{siteurl}/en/Menu_item_alias/text3/items/4-section_alias ---> for filters using TAG ID 55

And to make thing cleaner if possible remove the section_alias from the URL aswell to look like this http://{siteurl}/en/Menu_item_alias/text3/items/4

You are talking of a few specific MenuItems of type "External URL"?
Wouldn't it be possible to use a 3rd-party SEF extension to create custom-URLs to your liking?

You might test it with MIJOSEF free version. There is also a special Cobalt Extension
I remember I have extension v1.3 somewhere...,
SH404SEF has also custom URLs and there is a file in the Cobalt Depot.

Although, I am not sure I got your full idea and issue ;)


darkhoros VIP
Total posts: 152
07 Jun 2016 10:41

Hi sergy and pepper, Thank you for your kind replys, Yes I can see them pepper.

@Sergey, I understan what you are saying, ok can't we make the URL redirect(or the URL rewirt) a silend redirect/rewrite, like the 200 redirect, that way we can redirect/rewirte the url as joomla API need in same time it is not shown in the browser URL, so SE will index it, also

@Pepper I think all these external menu item aliases and any sef extension will not keep coblat from changing the broswer url as it will not understand the target hide URL with out rewriting it, any way I will test it and will come back with more info.

Thank you.


Sergey
Total posts: 13,748
12 Jun 2016 10:38

darkhoros @Sergey, I understan what you are saying, ok can't we make the URL redirect(or the URL rewirt) a silend redirect/rewrite, like the 200 redirect, that way we can redirect/rewirte the url as joomla API need in same time it is not shown in the browser URL, so SE will index it, also

I am working on filter URLS in Cobalt 9. But even there I think URLs will be unreadable. Something like filert/hj33k45h4jh345kjhj45 rather than year/2000/color/red.


darkhoros VIP
Total posts: 152
13 Jun 2016 12:23

Hi, Well from my very limited point of view this will have a catastrophic effect on any one in need for good SE indexing and aiming for high SE results in 1st page. I think we need to look more in to this, Cobalt is a brilient peice of software but this lack of sef urls for filters may kill it. Thank you.


Sergey
Total posts: 13,748
13 Jun 2016 13:26

I heared you. Nothing stops me to change j45lkj5446lkj456kjl to tear/2000/color/red. Let's see.


darkhoros VIP
Total posts: 152
15 Jun 2016 13:09

I hope things work out. Thank you.


Sergey
Total posts: 13,748
17 Jun 2016 15:20

I hope too :)


Sergey
Total posts: 13,748
15 Mar 2017 09:54

What kind of a solution do you expect? You want SEF URLs for filters? You can do it now with any redirect extension.

Or you want every search result have it's own URL?


darkhoros VIP
Total posts: 152
18 Mar 2017 21:42

Thank you for your reply sergy, I am using redj from http://www.selfget.com/

I can build sef url, but when i enter these sef url in the address bar, it should take me to the target page without changing the url, but this dose not happen with cobalt, what happen is, lets say i have this sef url www.domain.com/cobalt/my-filtered-results

when I enter this url in address bar it is changed to

http://{siteurl}/index.php?option=com_cobalt&task=records.filter&section_id=4&Itemid=101&filter_name[0]=filter_tag&filter_val[0]=59

which is the actul url I used to build my sef url,

this redj component from selfget has this fasinating option which is internal redirects or 200 redirect, which do a silent redirect where the address bar url dose not change but the page loads the original filter URL.

this option is not working with cobalt while it is workiing with other CCKs i used to use in the past.

So to answer your question, what do I expect? Will what I need is to have this url http://www.domain.com/path-to-coablt/tagID-tag-value to redirect to actual tag based filter url while the url in address bar dose not change from sef url.

I hope I am clear, I know this is hard to understand but SEO is my business, and this is crutul to have.

And I am willing to sponsor any solution you can reach. Thank you.


Sergey
Total posts: 13,748
29 Mar 2017 12:31

That is right. this is because Cobalt uses Joomla core filter system. Same is used in Backend when you filter list to show only published for example. It is also not in the URL there.

This is because this system is based on state (session). And it works through redirect. Submissin page set filters to state and then redirect back to list with apply of filters in state.

It is not very easy to change, to work like you want. This is aready a case now. I mean we already know that this is not the best aproach. And it is planned for Cobalt 9 to be changed. Cobalt 9 because those are not slight changes. The core of filtering system have to be changed.

But unfortunately I cannot say you the date of Cobalt 9 release.

Powered by Cobalt