Linking from a list entry to the entry information

Linking from a list entry to the entry information

by Megan Nussbaum -
Number of replies: 6

Hello!  I am wanting to know if there is a way to link from an entry on the View List page to be able to the single entry that was made.  For example, I took a screenshot from the first entry on our page and I would want to have "Watch List" linked to the page that was made for it.

Please let me know if there is a way to accomplish this.  Thank you!

Average of ratings: -
In reply to Megan Nussbaum

Re: Linking from a list entry to the entry information

by Itamar Tzadok -

The ##more## tag can be added to the entry in the list view and will display an icon that is a link to the entry in the single view. smile

In reply to Itamar Tzadok

Re: Linking from a list entry to the entry information

by Francis Vendrell -

Hello,

I asked a similar question two days ago.

I would like to link an entry in the list view obtained from a "tabular" view to the entry in the single view obtained from an "extended grid" view.

In my "tabular" view only a few fields of the entry are listed and in my "extended grid" view all the fields are displayed.

The idea is to link from a simple list view to a different single detailed view, in the same way than for the database module.

How is it possible to do this ? thoughtful

In reply to Francis Vendrell

Re: Linking from a list entry to the entry information

by Itamar Tzadok -

If you have the latest version of the Dataform (currently available only from git) there is a designated pattern for that:

#{{viewlink:view-name;link-text;url-query;}}#

view-name: The name of view that is linked.

link-text: The text of the link. Could be html but ';' or any html special chars that would contain ';' if entered in editor mode, cannot be used.
A special link-text pattern allows for display theme icons, e.g. _pixicon:f/pdf:Download, _pixicon:i/edit:Edit etc.

url-query: Url query parameters that will be added to the view url in the link. These are arg=val pairs separated by |. The args should be expected by the target view to take effect. The vals can be entry patterns.

Example for displaying a linked icon that will open the entry in a view called Single:

#{{viewlink:Single;_pixicon:t/preview:Details;eids=##entryid##;}}#

 

In earlier versions you can set the target view (the extended grid view in your case) as default More by clicking the button in its M column in the view list. Then the ##more## tag will point to that view rather than to the current view.

smile

 

In reply to Itamar Tzadok

Re: Linking from a list entry to the entry information

by Francis Vendrell -

I downloaded and installed the last version of dataform from GitHub

I tested your example above and it works perfectly well.

Thank you very much!!!!

In reply to Itamar Tzadok

Re: Linking from a list entry to the entry information

by Megan Nussbaum -

Thank you for the response.  Can you provide more information on how to add the ##more## tags to the view list page?  From what I can tell I can't edit the view list submissions once they have been done.

Additionally, how do you do this when putting in a brand new entry under "add entry"?

In reply to Megan Nussbaum

Re: Linking from a list entry to the entry information

by William Lu -
Picture of Particularly helpful Moodlers

Link from list view to single view in Moodle Database module:

Option 1:

in 'list view template', insert ##more##, in 'list view', it will display an 'amplifier' icon like this: 

icon

, click on the icon will open the single view record.

Option 2: 

in 'list view template', insert <a href="##MoreURL##">[ [any filed name you want to display]]</a>, e.g <a href="##MoreURL##">[ [WatchList]]</a>
in 'list view', it will change that [ [name]] field to a hyperlink and open that single view record.

NOTE: the field name should be: finished with ]] and starts with [[ The Moodle.org filter changed my code, so I've to make a space between the first [ and second [.