WeStandWithUkraine

44 Posts
motombo
6 years ago
Topic

Hi I am trying to create a list with tables I created on Mysql db. But list doesn't show. I tried with joomla native content table and it worked well. So is the seblod list search designed to work only with joomla native tables?

 

Get a VIP membership
1279 Posts
Bucklash
6 years ago
1
Level 1

Hi

So what have you tried?

How did you create your search,

and what fields are in your search,

and what dies the sql query look like (turn debug on in template config)

Cheers

Jon

44 Posts
motombo
6 years ago
0
Level 2

Thank you Jon,
- I have created a device table were first column name was device_id
- Created a seblod form (device) for imput and data view base on the device table
- Created a seblod list & search table based on device form
- At the first load, the list & search table was empty. I went in my sql device table and changed the first column name from device_id to id. After this change, I was able to list items in my search list.
Next think I wanted to do was to link each search item to its content. So a click on any search item will show the content. To accomplish this, I went to list, option 2 (Link + Typography) and selected Content View under link for each item I wanted to use as link to the content. But link hasn’t been generated. Here is what it shows when I inspect the search item under chrome.
When I inspect a working search list created based on joomla content table. Result shows the link under each item like this.

<tr class="cat-list-row0">
  <td>device</td>
</tr> 

When I inspect a working search list created based on joomla content table.
Result shows the link under each item like this.

<tr class="cat-list-row0">
  <td>
    <a href="/index.php/device-list-test/256-quick-assistance-request">device</a>
  </td>
</tr>
 

As you can see the tag is missing on the first one. What do you think I am missing here?

1279 Posts
Bucklash
6 years ago
7
Level 1

Hi

I don't think I know the answer to this...

Have you created your own table i.e. #__cck_my_own_table

or did seblod i.e. #__cck_store_form_my_own_table?

It would be best to have the latter....

Better mark this as unsolved, sorry

44 Posts
motombo
6 years ago
6
Level 2

I created the table and named it exactly devices with no cck_. do I have to add cck_prefix?

ISSUE HASN'T BEEN SOLVED YET. I don't know why it is marked as solved. I tried to change it but I can't.

1279 Posts
Bucklash
6 years ago
5
Level 3

Hi

Sorry, I should have typed 

#__my_own_table

1279 Posts
Bucklash
6 years ago
4
Level 4

Hi

1

I don't understand why you create #__device and then use a seblod form to populate it. You are going to end up with a new table from Seblod anyway (as far as I can tell) - probably because of the reasons stated by Klas: searching-a-non-joomla-table

2

Anyway, what does your sql query look like? That will tell you what you need to resolve (debug option in template config).

3

Are you using Search Query and/or Search Join fields etc

44 Posts
motombo
6 years ago
3
Level 5

1- I am using a 3th party table. When I create a field in my form I use a free storage and select the table I have already created then I add a new column.

I don't know how to create table using seblod. My table is listed in  #_cck_core 

Note: Search function works well on my search form. I am only having problem link each search item to the content. 

Here is what I am doing. 

1-  Under search Form Tab, I use the CCK field and select the device form as live value save

2- Under list tab I  select all fields I want to view on my form them on each field I select Option 2 (live value) on the right then I click on None under the "Link" column and I select view under Content.

Result I am expecting from this is to view the full content when I click on each item in the list.But I am getting no link at all on the items when I Use a free storage. But same think work perfectly when I use any native joomla table. 

What I am trying to do is to create an application with many table not beeing joomla tables.  

 I haven't writen any query. I am using only seblod functions.

HELP Please.

1279 Posts
Bucklash
6 years ago
2
Level 6

Hi

I am no guru on this but I'm interested to find the answer...

Will hopefully have a look Friday

44 Posts
motombo
6 years ago
0
Level 7

Thank you for you determination to help. I just spend the whole day searching on it. I don't know if it is event possible with seblod. please let me know if you find any answer for this. By the way is there any other option to view the content details on seblod without using the list search? 

44 Posts
motombo
6 years ago
0
Level 7

Hi There,

Apparently the link feature of Seblod doesn't work with free storage. This link seams to provide the solution but there is not enough explanation or I am not understanding well what to do. Take a look and see if you can get it to work. 

http://www.seblod.com/community/forums/lists-search-types/link-content-to-list

1279 Posts
Bucklash
6 years ago
10
Level 1

Hi motombo

I have a result, but probably not near the result you are looking for...
I pulled results from a table that is NOT linked to the #__cck_core table but where the menu items have the same alias as the articles
I started by trying to follow this tutorial:
using-the-search-query-field-plugin

...but either I was doing it wrong or something has changed...anyway.... I stuck with the 'pull data from #__menu' idea...

I created:
Two List and Search Types
Two Menu Items

  

  

LIST & SEARCH TYPE "MENU LIST"

I created a List & Search type called 'Menu List', object is article (object: free needs #__cck_core??), #__menu info is not in #__cck_core....

I added a Search Join field to the Search Form View which joined #__content on #_menu where the alias was same for both tables.

This gets all the menu items that have the same alias as the content, as dictated by the search join field.

I added fields to the List View corresponding to columns in the #__menu table:

Text field called 'Menu Item Title' with Storage: Standard | Free | title | Parameters: #__menu.

Text field called 'Menu Item Id' with Storage: Standard | Free | id | Parameters: #__menu.

I could have chosen more (i.e. path, link etc)

   

  

MENU ITEM TYPE "LIST & SEARCH": SEARCH TYPE "MENU LIST"

Creat a 'Seblod Search Menu Item' to see the results of 'Menu List'.... These results will link to the 'view'

...Navigate back to the  LIST & SEARCH TYPE "MENU LIST"...


In the List View, select 2 'Link + Typography'.

For one of the fields, in the Link column, I selected Joomla Menu Item.

This option allows me to add a value to 'custom variables '. I added "&id=$cck->getValue('menu_item_id')" which adds this value to the url/uri.

However, we need to create the menu item we want to link to. This menu item will render a List & Search type, using the id value as a filtering option...

LIST & SEARCH TYPE "MENU ITEM ID"

I duplicated the 'Menu List' List & Search Type.

I called it 'Menu Item Id'. 

The Search Form View of 'Menu Item Id' will use the value that I am going to pass it i.e. the id, so I added the Menu Item Id field to the Search View.

I then navigated back to 'Menu List' Search & List Type, back to the field where I applied the 'custom variable' and changed the menu item to 'Menu Item Id' as can be seen in the image above.

   

   

MENU ITEM TYPE "LIST & SEARCH": SEARCH TYPE "MENU ITEM ID"

I created a Seblod List Menu Item and selected the List & Search Type 'Menu Item Id'.

This will list the menu item, filtered by it's id, but it's not ready yet.

Back to the LIST & SEARCH TYPE "MENU ITEM ID"...

In the Search Form View I selected 2 ''Live + Live Value. This will apply a live value to this field

For the field 'Menu Item Id', in the Live column, I changed the value to  URL Variable (now called URL ??)

After clicking 'configure, I set 'variable' to id, and 'type' to Int (because that's what the id is).

In the List View I put the values I wanted. Earlier I created a title field so that went in.

If you inspect your 'Menu List' links, you will see the link to the 'Menu Item Id' menu item, with the id appended.

Clicking the link will take you to the list 'Menu Item Id' List & Serch View, filtered by that id.

  

It's probably a really confusing read, and might not help. Hope it does somehow

Bucklash

PS

This is a way, not the way and it is based upon this forum post:  link-content-to-list by Webcastor

44 Posts
motombo
6 years ago
9
Level 2

Thank you for the great job. But I am not sure it will help me. My tables are totally free and have no aliases in joomla content table. 

1279 Posts
Bucklash
6 years ago
8
Level 3

Hi

Question: Are you trying to use the content view? There is no content view if the data is not part of a content type...

It would have to be a list view. From there, you can create a menu item that is displaying the list and search type. You can pass a value to the url so that the menuitem can filter accordingly

Also...

Re my loooooong example, man, I took the long way round:

Simply create a list and search type that is

"What kind of items are you searching for? = none" and
"Object = free"

add the field 'select query'

Make sure it is set as "standalone" rather than "append".

Add your query ie 

'SELECT title, id FROM #__menu WHERE menutype = 'manmenu'

In the list Item view add a field that points to whatever you have gathered from your query ie 

Standard | Free | title | param: #__menu

(you have to select the param (#__menu) before you can select the db column (title))

and place the search in menu item or module....

Bucklash

44 Posts
motombo
6 years ago
7
Level 4

Thank you again. I am definetely getting on the way but still stroggling a bit.

Now I know SEBLOD content view works only with joomla native tables. So, to show my item list content I need to create 2 List & Search form. 1 to pull up my list and the second to show the appropriate content when a user clicks on any item in the list. Right?

 I have my list view ready named List view1. I have created a second list type named view1 data to show 

List view1 items details. I have also created a menu that points to 

view1 Now I am stuck on how to use the menu in List view1 and past the article id 

for each item in my list to show item details in view1

1279 Posts
Bucklash
6 years ago
6
Level 5

Hi

You are on the right track...

There are a few forum posts about this, but it depends how you want it done...

Your menu url might look like this:

[some-site]/index.php?Itemid=145&option=com_cck&view=list&search=view1&task=search

You could create a link like this:

[some-site]/index.php?Itemid=145&option=com_cck&view=list&search=view1&task=search&id=****

Using html typography you could output like this:

<a href="/[some-site]/index.php?Itemid=145&option=com_cck&view=list&search=view1&task=search&id=$cck->getValue('some_field_with_the_id')" target="_blank" class="btn btn-info">
View Page
</a>

There are other ways....

And then in view1 Search View....

The Id field....

Apply the live setting to URL variable....

In the config, tell it to pull id from the url... you can also specify the type of value ie int

Something like that anyway... I might have made a mistake somewhere ;)

Hopefully this answer and others get's you on track

44 Posts
motombo
6 years ago
5
Level 6

Thank you Bucklash. I am finally able to get dynamic link from my serach list "list view1" well pointed at appropriate detail on the view1 search. I have used on search view1 >  List & Search Option under option 2 (Link), Click on the + and under Serach Type (List)* I have selected view1; under menu Item, I selected the menu I creatd earlier that points to view1; under field, I selected Custom and entered the field name id

on the view2 under Live value (2) I selected Variable for the CCK_id field, went to configure and selected the same options as on construction 1 you did.

NOW I have another isue. content details contains uploaded files. these files are not showing at all on view1. Did uploaded files shows only in the form content or I need another setting?

   

1279 Posts
Bucklash
6 years ago
4
Level 7

Hi

The best thing to do is go through the sql query...

enable debug in the seblod templates config, and post it.

44 Posts
motombo
6 years ago
3
Level 8

Thank You . I will try different template and see. I will also try my file upload field with joomla content to make sure it works. Thans a lot for your help.

44 Posts
motombo
6 years ago
2
Level 9

I were able to sort out the file issue view. Now the issue is that when I click on the file name, instate of downloading the file, it takes me to the home page. some time it says the file doesn't exist. I already vitrified that the file exist and that it is it the right folder with 755 right. 

I will appreciate any help to solve this issue.

 

1279 Posts
Bucklash
6 years ago
1
Level 10

Hi

Not sure if this helps...

The upload file didn't have the output code I wanted so I created a field, Storage none and had html output like this:

<a href="/documents/lesson-files/$cck->getValue('some_field');" class="btn btn-info " type="button" download="$cck->getValue('some_other_field');"><i class="fa fa-download"> </i>Download</a>

Actual rendered output:

<a href="/documents/lesson-files/fretboard-notes.pdf" class="btn btn-info " type="button" download="Fretboard Notes.pdf"><i class="fa fa-download"> </i>Download</a>
44 Posts
motombo
6 years ago
0
Level 11

I tried your method but the link doesn't event show in my list.

As a reminder, field is saved in a free storage.

With the same joomal and seblod setting Download works perfectly when I use Joomla content table as storage. when I inspect both links they look alike:

<a href="/index.php/upload-file-s?task=download&file=single_upload_art&id=167" title="">003.jpg</a>

<a href="/index.php/my-devices?task=download&file=single_file&id=169" title="">003.jpg</a>

so Issue is due to the fact that uploaded file is saved in a free table. Any idea to fix that?

Get a Book for SEBLOD