Welcome, Guest
Username: Password: Remember me
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
  • Page:
  • 1
  • 2

TOPIC: subtable search, formatting

subtable search, formatting 1 year 7 months ago #1733

  • marec33
  • marec33's Avatar
  • OFFLINE
  • Posts: 6
  • Karma: 0
Hi,

I have 2 questions.
1. Is possible to search in subtemplate(second table), If yes what I have to do? For example I have table publications and table authors using index table with relationship n:m. The main table is publications. When I type author name in searchbox It can't find anything.

2. How to change formatting of output from subtemplate? For example In catalog-template I have this: "{joodb subtemplate|author1}{joodb subtemplate|author2} but on output it looks like:

Steve Jobs

Bill Gates

I need to have it like that: Steve Jobs, Bill Gates

Thank you for answer
Last Edit: 1 year 6 months ago by joest.
The administrator has disabled public write access.

Re: subtable search, formatting 1 year 6 months ago #1754

  • marec33
  • marec33's Avatar
  • OFFLINE
  • Posts: 6
  • Karma: 0
Can I get answer please? I'm stuck here for 2 weeks.
The administrator has disabled public write access.

Re: subtable search, formatting 1 year 6 months ago #1755

  • dirk
  • dirk's Avatar
  • OFFLINE
  • Posts: 493
  • Thank you received: 78
  • Karma: 10
marec33 wrote:
1. Is possible to search in subtemplate(second table), If yes what I have to do? For example I have table publications and table authors using index table with relationship n:m. The main table is publications. When I type author name in searchbox It can't find anything.

Not for a n:m relation because Autors can be related to more than one book.
The next version will have the possibility to choose the fields you want to search in.

Meanwhile you could add a field with the authors names to your table or generate a second Database with your authors.
marec33 wrote:
How to change formatting of output from subtemplate? For example In catalog-template I have this: "{joodb subtemplate|author1}{joodb subtemplate|author2} but on output it looks like:

Why "{joodb subtemplate|author1}{joodb subtemplate|author2}?

If you linked the second table correctly you need only on subtemplate. The template will be repeated for every author of the book.

The problem might be the comma. Maybe you can take a List for it.
<ul class="authors">{joodb subtemplate|AUTHORS}<ul>

Make sure that your editor does not change the code an you have only a <li>{joodb field:AUTORNAME}</li> into your subtemplate.

If you do like this you can make a inline-list with a separator using CSS.
#taglist {
  display: inline;
  list-style: none;
}
 
#taglist li {
  display: inline;
  list-style: none;
  background: none;
  padding: none;
}
 
#taglist li:after {
  content: ", ";
}
 
#taglist li:last-child:after {
    content: ""
}
The administrator has disabled public write access.
The following user(s) said Thank You: marec33

Re: subtable search, formatting 1 year 5 months ago #1856

  • marec33
  • marec33's Avatar
  • OFFLINE
  • Posts: 6
  • Karma: 0
dirk wrote:
Not for a n:m relation because Autors can be related to more than one book.
The next version will have the possibility to choose the fields you want to search in.

Is it possible in current version or when will be new one?

dirk wrote:

Why "{joodb subtemplate|author1}{joodb subtemplate|author2}?

If you linked the second table correctly you need only on subtemplate. The template will be repeated for every author of the book.

Here is my problem... in index table I have column id_author which is linked to id_author in table authors. If I have just one number (001) in it everything works fine but if I add more numbers (001 002 003) or (001,002,003) it doesn't works. I understand why, but I can't find solution how to make it work. Do I need to add somewhere in code that (,) is separator or something like this? Or exists some better solution?


I'm stucked here for weeks and I have very little time now. So please could you please give me fast answer? :) Thank you very much
The administrator has disabled public write access.

Re: subtable search, formatting 1 year 5 months ago #1887

  • joest
  • joest's Avatar
  • OFFLINE
  • Posts: 159
  • Thank you received: 24
  • Karma: 1
joodb.feenders.de/support.html
The forum is your platform to help each other (we do read your posts and will help and answer every now an then. Remember - no direct support for the free version).
The administrator has disabled public write access.

Re: subtable search, formatting 1 year 5 months ago #1888

  • marec33
  • marec33's Avatar
  • OFFLINE
  • Posts: 6
  • Karma: 0
OK, I understand :) I have one last question:
dirk wrote:
Not for a n:m relation because Autors can be related to more than one book.
The next version will have the possibility to choose the fields you want to search in.

Is it possible now? If yes, how?

Thank you for all your help. You helped me a lot with my bachelor thesis.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: dirk, joest
Protected by R Antispam