tronline
Total posts: 7
10 Oct 2015 11:59

I have purchased the filter module, and I am using it as a simple search field to be shown on every page in right column. But on the Cobalt submission form page it is not visible and therefor it breaks my general page layout.

Is that a bug or desired behaviour? Is there a possibility to show the filter module on the submission form page?

Last Modified: 15 Oct 2015


pepperstreet VIP
Total posts: 3,837
10 Oct 2015 19:26

Hello tronline, apparently it is on purpose. The module's main php file checks for the "form context".
I don't know the exact reason, maybe to prevent javascript issues or just to get more space...

Anyways, it doesn't make much sense to display the search/filters during submission!?
Why and how does it break your page layout?


tronline
Total posts: 7
10 Oct 2015 22:10

As I said, I am using the filter module as a plain search box. It is placed in the website's header, next to the main menu. I agree with you that you may not really need it on the submission page, but when you open that page, the search box is just missing in the layout.

I think I will place a disabled dummy search box in that spot. The user will not be able to use it, but he probably won't even notice that it is disabled, because he doesn't try. :o)

Thanks for the reply anyway. So I know that I don't have to look for that option in the Cobalt configuration anymore.

EDIT: Oh wait, it's much more easier to edit the module's main file (although I usually try to avoid hacking core files). Just 4 lines of code to take out - that's worth it...


Sergey
Total posts: 13,748
11 Oct 2015 12:35

tronline I think I will place a disabled dummy search box in that spot. The user will not be able to use it, but he probably won't even notice that it is disabled, because he doesn't try. :o)

Ha ha ha! Thank you. That was really funny!

tronline EDIT: Oh wait, it's much more easier to edit the module's main file (although I usually try to avoid hacking core files). Just 4 lines of code to take out - that's worth it...

I do not remember why I did this only one exeption in the module, but I am sure there had to be a reason.

And I am still loughing! :D


pepperstreet VIP
Total posts: 3,837
11 Oct 2015 22:34

Sergey I do not remember why I did this only one exeption in the module, but I am sure there had to be a reason.

In general, I like the idea to hide a (bigger) filters/search sidebar during submission.
Probably you hide it because of the inherited section ItemID. If you don't use a separate Cobalt submission MenuItem, you would not have a chance to hide it on submission form.

However, it is not optimal to "hard-code" the URL check in the main file ;)
Maybe it can have a parameter? Or the check inside the template file? So, one might create an override.


tronline
Total posts: 7
13 Oct 2015 09:15

pepperstreet Maybe it can have a parameter?

I would appreciate that...

...because I did not go with the dummy search box but edited the module file.


Sergey
Total posts: 13,748
13 Oct 2015 09:26

I added parameter.


tronline
Total posts: 7
15 Oct 2015 21:13

Just downloaded and installed. Works perfectly for me. :-)

Thanks a lot!

Powered by Cobalt