GetSimple Support Forum

Full Version: page content / component search
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In my pre-GetSimpleCMS days I enjoyed being able to do a global directory search to locate all occurrences of code that needed to be attended to.
Granted, there is less need for this now, given the nature of a CMS, which provides a great way to avoid repetition.
Still, it would be nice if we could find all pages/components where a certain (e.g., dynpages) shortcode was used, where certain html tags (e.g., href) and parameters are used, there might even be a use to also cover template files in such a search.

(I am not posting this as a feature request, because I may be unaware of existing solutions.)

So, in short: is there already a way to search the whole content of your design?
This is probably better left using a local copy and just resync your xml files. It would be fairly easy to write an indexer, but doing a real time search in what could be a hundred files in php is probably not the best solution.

Now if you can do a system call to grep, then thats an option , then you need a front end to jump to appr editor.

You can try using i18n search and see if it supports raw searching also ( it searches pages and after filters run i think )
(2017-03-11, 19:04:37)vanfruniken Wrote: [ -> ]In my pre-GetSimpleCMS days I enjoyed being able to do a global directory search to locate all occurrences of code that needed to be attended to.

I view this kind of thing as a feature of the development environment, rather than something the CMS should provide.

(2017-03-11, 19:04:37)vanfruniken Wrote: [ -> ]Still, it would be nice if we could find all pages/components where a certain (e.g., dynpages) shortcode was used, where certain html tags (e.g., href) and parameters are used, there might even be a use to also cover template files in such a search.

If you need a way of doing global search and replace, I can recommend rpl. I use it for server migrations (e.g., from development URL to production) and http to https, for example. It's a Python script, so no installation required if you already have Python and I can run it remotely on the hosting server without drama. It will operate on any text file (.xml, .php, ...), recursively from the base directory or focussed on a small subset of files.
(2017-03-12, 20:47:36)hameau Wrote: [ -> ]
(2017-03-11, 19:04:37)vanfruniken Wrote: [ -> ]In my pre-GetSimpleCMS days I enjoyed being able to do a global directory search to locate all occurrences of code that needed to be attended to.

I view this kind of thing as a feature of the development environment, rather than something the CMS should provide.
Exactly, no need to slow down the client experience.
Merely a possible developers' feature.
However I noticed that when pasting plain html page content into GetSimple page source, remaining javascripts and css continue to work (even though they should be weeded out ASAP and moved to components or data/uploads/), an i18n search does show in-line js and css in the search results.
(2017-03-12, 20:47:36)hameau Wrote: [ -> ]
(2017-03-11, 19:04:37)vanfruniken Wrote: [ -> ]Still, it would be nice if we could find all pages/components where a certain (e.g., dynpages) shortcode was used, where certain html tags (e.g., href) and parameters are used, there might even be a use to also cover template files in such a search.
If you need a way of doing global search and replace, I can recommend rpl. I use it for server migrations (e.g., from development URL to production) and http to https, for example. It's a Python script, so no installation required if you already have Python and I can run it remotely on the hosting server without drama. It will operate on any text file (.xml, .php, ...), recursively from the base directory or focussed on a small subset of files.
Thanks for pointing this out. I'll give rpl a try. But now that you mention this, a texteditor such as TextWrangler/BBEdit could run a file search in a collection of mounted FTP subdirectories.
Of course it continues to work ckeditor allows js and css...