- Issue created by @coaston
- π©πͺGermany geek-merlin Freiburg, Germany
This module opens any existing path in a dialog.
Do you have an URL for your display mode? Then use it.
There are modules that provide such paths, if you don't want to write a .routing.yml. - π©πͺGermany geek-merlin Freiburg, Germany
Feel welcome to add a documentation page for the module and add that there.
- πΈπ°Slovakia coaston
Hi Geek-Merlin.
i was not successful with the display mode so I wanted to provide workaround as follow:
1.Create new view
2.Add field "Notes"
3.Add path to page : /mynotes/%
4.Add Contextual filter to ID (Content ID from URL)Now when I open page like : /mynotes/13242 - it opens page
5.Create new view
6.Add field like ID, Tittle etc
7.Go to Title for example > Rewrite results > Output this field as a custom link > /mynotes/{{ nid }}?dialog[type]=modalWhen I hover over mouse to title now I can see the same link :/mynotes/13242 however when I click on it - nothing happens
When I visit the same link /mynotes/13242 it works fine, however dialog does not work.
Any idea ?
- πΈπ°Slovakia coaston
I just noticed it gives following error in logs when I click on that "title" which has output as link in dialog :
Warning: Array to string conversion in Drupal\Component\Render\PlainTextOutput::renderFromHtml() (line 22 of /core/lib/Drupal/Component/Render/PlainTextOutput.php).
- π©πͺGermany geek-merlin Freiburg, Germany
Please always provide a backtrace with error messages. Without, it's useless.
- πΈπ°Slovakia coaston
Thank you for your response...please find attachment.
- π©πͺGermany geek-merlin Freiburg, Germany
Some custom code tries to PlainText an array where a string is needed. Nothing related to this module.
- πΈπ°Slovakia coaston
Hm I dont have any custom code there..
I believe you can simply replicate the issue you just need 2 pages in view of the same content and from one page create link as output of the any field with path including the dialog to open the second page.
- πΈπ°Slovakia coaston
Hi Geek-Merlin.
I just realized that Title is missing because from the content it can take by default, but not from the views, so if I use additional options as follow:
/mynotes/{{ nid }}?dialog[type]=modal&dialog[options][title]=Hello
-Now it opens dialog correctly, but still the same php warning message when I check logs, hence it seems I still need any required option which is given by default when we work with content, but it does not work with views page. Do you know which options are required by default?