random idea: allow the ability to link to a specific form field in the CMS

39 views
Skip to first unread message

Nicolaas Thiemen Francken - Sunny Side Up

unread,
May 23, 2015, 7:31:48 PM5/23/15
to silverstripe-dev
Hey Everyone

If we had a "deep-linking" system that would allow us to link to a specific field in the CMS then this would save all of us (including our clients) a ton of time.


Or 


The formfield would be highlighted with a background color or an arrow or something like that.

This would basically be used in a scenario like this:

e.g. 

client: I dont see page X in the menus

developer: you need to turn it on using the ShowInMenus tickbox, you can do that here:  


A screenshot works perfectly for this, but a hyperlink would be faster for all concerned. 


==== end of random idea ====


Nicolaas

Marijn Kampf

unread,
May 24, 2015, 4:59:32 AM5/24/15
to silverst...@googlegroups.com
My +1 for the idea. I've used something similar in a non SilverStripe but HTML based C# application: http://www.abscreensavers.com/random-photo-screensaver/configuration/?tab=media

Marijn

--
You received this message because you are subscribed to the Google Groups "SilverStripe Core Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to silverstripe-d...@googlegroups.com.
To post to this group, send email to silverst...@googlegroups.com.
Visit this group at http://groups.google.com/group/silverstripe-dev.
For more options, visit https://groups.google.com/d/optout.

Patrick Nelson

unread,
May 24, 2015, 1:45:14 PM5/24/15
to silverst...@googlegroups.com
Say if one where to hypothetically build this feature, upon which branch should said hypothetical feature be based?

Sent from my iPad

Stevie Mayhew

unread,
May 24, 2015, 4:34:13 PM5/24/15
to silverst...@googlegroups.com
According to SemVer this could go into a 3.x branch as it is adding new, backwards compatible functionality.

Uncle Cheese

unread,
May 24, 2015, 5:48:54 PM5/24/15
to silverst...@googlegroups.com
Can I suggest that someone build this as a module first to prove the concept? Not sure that at core commit needs to be the focus right now.

Nicolaas Thiemen Francken - Sunny Side Up

unread,
May 24, 2015, 6:08:08 PM5/24/15
to silverstripe-dev
Thank you all for your comments... 

I am going to try to build it into one of my modules...  I reckon like this:

1. add JS file to CMS

2. in JS file on document.load, check for url fragment  (or should we use GET var?) and if it exists, find it in the CMS fields and then highlight it with a class + a bit of CSS?



On 25 May 2015 at 09:48, Uncle Cheese <aa...@silverstripe.com> wrote:
Can I suggest that someone build this as a module first to prove the concept? Not sure that at core commit needs to be the focus right now.
--
You received this message because you are subscribed to the Google Groups "SilverStripe Core Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to silverstripe-d...@googlegroups.com.
To post to this group, send email to silverst...@googlegroups.com.
Visit this group at http://groups.google.com/group/silverstripe-dev.
For more options, visit https://groups.google.com/d/optout.



--
Nicolaas Thiemen Francken
  www.sunnysideup.co.nz
  phone: +64221697577

Corey Sewell

unread,
May 24, 2015, 6:15:39 PM5/24/15
to silverst...@googlegroups.com, n...@sunnysideup.co.nz
Cool idea, would really come in handy for clients who have trouble finding particular fields.

I would implement it using the a GET var, as modules/silverstripe would be able to detect it as well and put it to use if needed. URL Fragments can only be read with Javascript.

Adding a css class, such as "selected" or "focused" to the field would be the best way to go I reckon.

So you would need to
1) Add additional JS File to CMS
2) Add additional CSS file to CMS
3) On load, check the existince of the query string and add the css class to the relating field. You would have to make the tab the field is in visible as well.

Aaron Carlino

unread,
May 24, 2015, 6:15:40 PM5/24/15
to silverst...@googlegroups.com
I think it’s a bit more complex than that. The form loads asynchronously, so I think you’ll have to hook into the entwine.onmatch (onadd?) event.
You received this message because you are subscribed to a topic in the Google Groups "SilverStripe Core Development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/silverstripe-dev/DG4T6UD0kUU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to silverstripe-d...@googlegroups.com.

Corey Sewell

unread,
May 24, 2015, 6:27:28 PM5/24/15
to silverst...@googlegroups.com
Your right. In another module I have used the follow to detect ajax loads

$("div.cms-container").entwine({
    onbeforestatechange
: function (e, data) {
       
//Do some action
   
}
});

So structure like:

function CheckAndHighlightActiveField(){
   
// Do main stuff here
}
$
("div.cms-container").entwine({
    onbeforestatechange
: CheckAndHighlightActiveField
});
$
( document ).ready( CheckAndHighlightActiveField );

Should cover all bases

Patrick Nelson

unread,
May 25, 2015, 1:15:03 PM5/25/15
to silverst...@googlegroups.com
I'd find this pretty useful, especially since I will often have validation for fields located on several tabs and there's an error just on one tab, I could navigate directly to the affected tab and field. Naturally it can be a little confusing to a user if they go to save a page and the button just stays green "Save & Publish" with a tiny black dialog in the top right saying "Validation Error" but no fields are highlighted and red in the current tab (obscuring the error).

That being said, if there are multiple tabs affected by field errors, it may make sense to highlight both the affected tabs as well as the fields. The highlight would then be removed after selecting the tab. However I think it'd be fine to just utilize this so that, by default, the first affected tab (with field errors) is selected using this abstraction. So, if this where to be done in the CMS, I'm not sure if it would be via URL fragment (anything after the #) or some separate JS-only error processing feature to automatically switch the tab, or both.
Reply all
Reply to author
Forward
0 new messages