× If you expect answers you should describe your problem and give as much information's as possible. (SQL-Structure, Template Code, Joomla Version ...) Please read this before posting: joodb.feenders.de/support.html

Specify table when using &search=search

More
10 years 11 months ago #1753 by libraent
Specify table when using &search=search was created by libraent
Trying to use an empty page w/search box using &search=search from another post. Problem is it's using the wrong table, how do I specify which table to use?

Thanks!

Please Log in to join the conversation.

More
10 years 11 months ago #1756 by Dirk
Can you please exactly tell us what you want.

Du you want to create an empty Database entry at the frontend?

The view is called edit and joobase is the parameter to specify the database
/index.php?option=com_joodb&view=edit&joobase=1

But you can also create an entry with the "edit" view using the menu.

Please Log in to join the conversation.

More
10 years 11 months ago #1758 by libraent
Replied by libraent on topic Re: Specify table when using &search=search
Yes, I want for people to search the "whole" database, not a category, when I did the initial search, it worked, but it was pulling the sample table instead of mine.

Please Log in to join the conversation.

More
10 years 11 months ago #1759 by libraent
Replied by libraent on topic Re: Specify table when using &search=search
So I just tried your suggestion, here's my start:

/index.php?option=com_joodb&view=catalog&joobase=2&search=search

Here's what it changes too:

/index.php?option=com_joodb&view=catalog&format=html&reset=false&ordering=&orderby=&Itemid=101&task=&search=selfish&limit=10

It appears the initial link works, becuase the table name is at the top, but as soon as I type a word in the search box and hit enter, the results are from table 1, the test data, not table 2.

Please Log in to join the conversation.

More
10 years 11 months ago #1761 by Dirk
Why search=search?

The search parameter defines the search phrase.

Have you ever tried to use the SITE-wide search plugin instead?

Your only chance is to redirect your search-form to an menu item without category parameter.
The problem is that the hidden field with the "Itemid"-Parameter is in the view.
<input type="hidden" name="Itemid" value="<?php echo JRequest::getInt("Itemid"); ?>"/>

So you must copy your catalog view to your template and change this line.
See here how to do this.
docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core

Instead of your current Itemid use the Itemid (Menus-ID) pointing to your complete catalog.
This can also be a hidden menu entry.
For example: (replace 1234)
<input type="hidden" name="Itemid" value="1234"/>

Please Log in to join the conversation.

More
10 years 11 months ago #1766 by libraent
Replied by libraent on topic Re: Specify table when using &search=search
I'm not wanting the search to be a menu item. and the search=search came from another post. I want a blank search form, with no items showing that someone can search my book table. That's what I want. Right now if the click on "Non-Fiction" which is a category menu item I created, then the search only searches that result. I want a search that works on the whole table. Thats the goal.

Please Log in to join the conversation.

Moderators: Dirkjoest