Using [[picture:url]] in an Html attribute

Using [[picture:url]] in an Html attribute

by Fritz Richter -
Number of replies: 3

Hi Itamar,

I would like to use the pattern picture:url within the href attribute of an <a> element. 

Both Texteditors, however, TinyMCE and Atto always mess up the code by replacing brackets and colons.

Do you have a hint, how to avoid the replacing?

Many Thanks,

Fritz

Average of ratings: -
In reply to Fritz Richter

Re: Using [[picture:url]] in an Html attribute

by Itamar Tzadok -

Long standing and definitely deserves to be adjusted as creating custom links with patterns can be very useful. Please open a tracker issue in the Set: Dataform tracker and I'll try to fix it for the next release next week. smile

In reply to Itamar Tzadok

Re: Using [[picture:url]] in an Html attribute

by Fritz Richter -

This sounds very promising. Here is the tracker issue:

https://tracker.moodle.org/browse/CONTRIB-5388

In reply to Fritz Richter

Re: Using [[picture:url]] in an Html attribute

by Itamar Tzadok -

Thanks. Fixed and will be released next week.

This opens a whole new world of options. It should now be possible to create more easily custom entry action links. For instance, suppose we have the following views:

  • List
  • Single
  • Edit

and we want the edit action of the entry in the List view to open the entry for editing in the Edit view. We can use the [ [EAC:edit:Edit] ] pattern which will display the link with the standard edit icon. If we want something else as the link content, some text or image or both, we can add this content in the editor and then select it and create a link via the link button of the editor. In the link url we can enter the following "url":

##viewurl:Edit##&editentries=[ [entryid] ]

This "url" will be resolved in browse mode to the url of the Edit view with the url param editentries that is required for opening the entry for editing (note redundant space between square brackets).

hth smile