single item not present as menu item #595
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#595
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
single item not present as menu item although "add a menu" is checked in the site views (getItem) of the component
@studio16
I've checked this area out and it works perfectly fine on the current JCB version(12.11.4), could you please share more information related to this issue or steps on how it can be reproduced?
there is a Menu-itemtype to the list view in the menumanager but no Menu-itemtype to a single item view in the menu manager
the "add menu" in the component's site view is checked at the single item (in my case "event") but does not appear in the menumanager
When you select a Menu Item Type, you first select the Component that you are working on then choose the menu item from the drop down
yes and than i have ONLY the list view and NOT the single item menu item
i would have assumed there would be a menu item possibilty attached to a single item id
Nope, I am afraid that functionality has not been available yet..
thought so since the xml in the frontend view is also as good as empty, wow no fields, i willa dd them myself, no problem but it would be a nice option. Besides the "add menu" has no meaning now on single item views
This link will help you add a form to a site view..
I think u add a comment to the wrong issue. This is about using a xml for menu type creation and has nothing to do with adding a form to anything. Again i will add it myself, been doing it for 15 years now ;-)
actually it woulf be a big a deal to add it, asuming there is always an id and some kind of title as a column
in the default.xml of the view we need to add:
And in the model, populateState we add:
$params_array = $params->toArray();
if (isset($params_array['item_id']))
{
$this->setState('question.id', $params_array['item_id']);
}
Can this be done somehow via jcb so we don't need to redo things manually on update component?
latest is the default xml additional code which got lost in previous comment
this should be re-opened
Okay I read over the issue, and I am still not sure what you are trying to do.
JCB has an option to add item id's to a menu. Have you done this, or ar you trying to do this and no success.... or what is the issue here.
what i want to do is:
we have 2 menu items,
1 list view which shows all db entries
1 single item view
in my case
index.php?option=com_studiosixteeneventmanager&view=event
index.php?option=com_studiosixteeneventmanager&view=events
the single item view will never go to a single item since there is no id to select in the menumanager
Therefor we need to add an extra field in the default.xml to gives us a dropdown of single items id's
For instance:
<fields name="params"> <fieldset name="basic" label="LABEL"> <field name="item_id" query="SELECT
title,
idFROM #__db_table ORDER BY
id" type="sql" key_field="id" value_field="title" label="_LABEL" require="true" description="JGLOBAL_SHOW_TITLE_DESC"> </field> </fieldset> </fields>
This gives us a dropdown select in the menumanager with, in this case the id and title (in case there is no title u cold choose to use id for key and for value)
This will add a single item id to the url.
now i have:
index.php?option=com_studiosixteeneventmanager&view=event
with the modification it will be
index.php?option=com_studiosixteeneventmanager&view=event&id=23
Only thing we need to do than is to modify the single event model
And in the model, populateState we add:
$params_array = $params->toArray();
if (isset($params_array['item_id']))
{
$this->setState('question.id', $params_array['item_id']);
}
These 2 modification give the user a single item menu type assign to actually a single event.
Maybe it can be done somehow via JCB but i havent't found it yet.
Okay what you are trying to do is already in JCB, but not that obvious, and not always needed in the way you are trying. But it is in JCB in both ways, and works very well.
For me to explain it here is hard, really hard. So we have two options, lets arrange a live session for the JCB community to ask me questions, and give answers in a like a open forum, and or just make tutorial, or just point you to tutorials that already deal with this indirectly.
But I know we will need to find some way to communicate this more clearly with everyone. Seeing that this is a simple task many would be trying to achieve. I know I touch on this in the Hello World Tutorial..., and a few others. But noting exclusive is yet been done. But you are the second person to ask for help with this in the last two weeks.
Okay... so let me know? arrange a JUG...JCB_JUG online, and or just make another tutorial, and or just point you to existing explanations.
perhaps because of the different timezones for now better if u point me to the current tutorial ;-)
Okay I opt for the new tutorial.. seeing this issue is very important and I want other to find the path easier then opening an issue on GitHub.
So it is still uploading, but please watch when its ready, and let me know if this resolved your issue.
I assume this is resolved...
i have been able to add the field wth the correct dropdown, i added display:menu but the dropdown is only available on the config page instead of the menu page. I will do some more test later on, thanks for now.
display:menu will not add it to the menu, only to the config of the component
This is therefor not resolved
Did you watch this https://youtu.be/tgtonbyyjDs, and have you looked at sermon distributor. Since it does add it to the menu and in fact you are able to chose both or target just one or the other.
If this is really still un resolved you will need to add a video recording of the issue, or very detailed screen-shots.
So if after looking at this tutorial, and checking the SD implementation, your still seeing an issues, then we are not on that same page. We are clearly not speaking of the same thing, and so misunderstanding is at play. So please do not take offense, but give better and clearer explanation so we can get this behind us. Video recording of what you are trying to do... the path you are following, and the outcome with as much detail as you can give... this is what we need.
It's kind of hard to listen to audio and watching screens flashing before your eyes without the possibility to see where you are. I end up adding a custom field named question_request_id and display:menu.
What i am trying to do is what i normaly do in minutes by adding a xml of the view with some fields (in this case a sql type since i need the id of a record in a dropdown select) to get the url for a single record view.
It got added to the config page (unwanted, since i choose display:menu)
https://tinyurl.com/y28qtobk
An not to the single menu item view
https://tinyurl.com/y2hbvzw9
Complete page of the field settings
https://tinyurl.com/y45hb8ay