×
Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues
No link to form in backend list view
Timo Ihnken
Yeni Üye
Posts: 3
6 yıl 4 ay önce #1822
Yazan: Timo Ihnken
No link to form in backend list view, Timo Ihnken tarafından oluşturuldu
Hi guys,
I've created a simple list with component creator. At first I tried out a date field, a time field an a simple text field as the fields of my component. When I checked the component list view in the Joomla! backend the text field turned into a link to the form view.
Then i replaced the text field in component creator with the sql extended field, so I can pick real posts from my Joomla! installation. Turns out now I have no link to the form view from my list view entry.
Is it possible to choose a field as link to the form like the ID?
Thanks
I've created a simple list with component creator. At first I tried out a date field, a time field an a simple text field as the fields of my component. When I checked the component list view in the Joomla! backend the text field turned into a link to the form view.
Then i replaced the text field in component creator with the sql extended field, so I can pick real posts from my Joomla! installation. Turns out now I have no link to the form view from my list view entry.
Is it possible to choose a field as link to the form like the ID?
Thanks
Lütfen sohbete katılmak için Giriş ya da Hesap açın.
Jamila
Ziyaretçi
6 yıl 2 ay önce #1843
Yazan: Jamila
Jamila tarafından No link to form in backend list view konusunda yanıtlandı
Hi Timo,
sorry for the late reply. I'm not sure I understand you. Do you mean that the text you introduced as the entry in the component for the text field looks like a link that links to the edit form?
Could you please explain what you mean with this: "Is it possible to choose a field as link to the form like the ID?" and maybe add some screen shots for us to better understand the issue?
Many thanks,
Jamila
sorry for the late reply. I'm not sure I understand you. Do you mean that the text you introduced as the entry in the component for the text field looks like a link that links to the edit form?
Could you please explain what you mean with this: "Is it possible to choose a field as link to the form like the ID?" and maybe add some screen shots for us to better understand the issue?
Many thanks,
Jamila
Lütfen sohbete katılmak için Giriş ya da Hesap açın.
Pieter-Jan van Rossen
Yeni Üye
Posts: 11
6 yıl 2 ay önce - 6 yıl 2 ay önce #1844
Yazan: Pieter-Jan van Rossen
Pieter-Jan van Rossen tarafından No link to form in backend list view konusunda yanıtlandı
Kinda depends on where you want to link it to: the individuel component item or the actual Joomla post it refers to? The last one is a bit more difficult, but i don't see why you should (since there is a list view for that probably already), so i think you want to link it to the edit page of the individual item.
You can do so by editing the default.php of your list page on administrator side, since the sql field wont create a link by default.
I recommend working with a template override (see more about template overrides here: docs.joomla.org/How_to_override_the_outp...rom_the_Joomla!_core), this technique also works for administrator side by doing so in administrator/templates/your_template (probably Isis).
In administrator/components/your_component/views you find a folder for each view you have. Find the list view and copy the default.php from the tmp folder. Place it in administrator/templates/your_template/html/your_component/your_view. So lose the tmp filder in this path. your_component and your_view should be the same as in the path to the actual component. Now you have a override.
EDIT: I use joomla overrides for ages now, but only just found out you can actually create overrides using the template manager: docs.joomla.org/J3.x:How_to_use_the_Temp...r#Creating_Overrides. Makes live a bit easier.
Now find in default.php your sql field (probably something like <?php echo $this->escape($item->SQL_NAME); ?> )
replace it with this and edit the url to fit your component:
if you don't know how to edit the url, you can always add a txt field like you did before download the component, find the correct default.php and copy the link from there.
Hope this helps you
You can do so by editing the default.php of your list page on administrator side, since the sql field wont create a link by default.
I recommend working with a template override (see more about template overrides here: docs.joomla.org/How_to_override_the_outp...rom_the_Joomla!_core), this technique also works for administrator side by doing so in administrator/templates/your_template (probably Isis).
In administrator/components/your_component/views you find a folder for each view you have. Find the list view and copy the default.php from the tmp folder. Place it in administrator/templates/your_template/html/your_component/your_view. So lose the tmp filder in this path. your_component and your_view should be the same as in the path to the actual component. Now you have a override.
EDIT: I use joomla overrides for ages now, but only just found out you can actually create overrides using the template manager: docs.joomla.org/J3.x:How_to_use_the_Temp...r#Creating_Overrides. Makes live a bit easier.
Now find in default.php your sql field (probably something like <?php echo $this->escape($item->SQL_NAME); ?> )
replace it with this and edit the url to fit your component:
<?php if ($canEdit) : ?>
<a href="<?php echo JRoute::_('index.php?option=COM_YOURCOMPONENT&task=YOUR_SINGLE_VIEW.edit&id='.(int) $item->id); ?>">
<?php echo $this->escape($item->SQL_NAME); ?></a>
<?php else : ?>
<?php echo $this->escape($item->SQL_NAME); ?>
<?php endif; ?>
if you don't know how to edit the url, you can always add a txt field like you did before download the component, find the correct default.php and copy the link from there.
Hope this helps you
Son Düzenleme: 6 yıl 2 ay önce Düzenleyen:Pieter-Jan van Rossen Neden: added info on creating template overrides
Lütfen sohbete katılmak için Giriş ya da Hesap açın.
Sayfa oluşturma süresi: 0.063 saniye