Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cms:search command #924

Open
szepeviktor opened this issue Jun 8, 2017 · 3 comments
Open

cms:search command #924

szepeviktor opened this issue Jun 8, 2017 · 3 comments

Comments

@szepeviktor
Copy link

szepeviktor commented Jun 8, 2017

n98-magerun db:query 'SELECT `page_id`,`title`,`identifier` FROM `cms_page` WHERE `content` LIKE "%search-string%";'

Should I be able to write a custom command based only on the Wiki?
https://github.com/netz98/n98-magerun/wiki/Add-custom-commands

@ktomk
Copy link
Collaborator

ktomk commented Jun 9, 2017

Not only, the Wiki contains some hints/tips for that. Best way I can suggest is pick yourself an existing command and take a look how it is done. Magerun commands are based on Symfony2 Commands, so it follows that configuration, some Magento / Magerun specific utils are available on top.

The beginning of that Wiki page tells how you can register your own command. This is necessary if you place your module into it's own project folder.

There are also additional resources available by other users who have written it down from their own perspective which can be very helpful for a start:

For some users it is easier to extend the Magerun project itself (fork it) to create command(s) on their own than to create an additional command. Both is possible, so just saying. Let me know if the resources linked shed some more light.

@yoosefi
Copy link

yoosefi commented Jul 24, 2017

Nice idea. Other CMS tables are:

cms_block
core_email_template

@ktomk
Copy link
Collaborator

ktomk commented Jul 24, 2017

I think this is a valid request. I'm open to comment further on, but from my end this would mean a first PR with some implementation material. It must not be perfect at all, you provide something and I'll give feedback. Whoever wants to make use of this, a first implementation must not deal with all options, so this is somewhat a good kind of starting point. I'm happy to share what I know about Magerun development, which is some of the Symfony basics combined with Magento specific topics.

The PR should be done by someone who has (personal) interest in this command as this normally works best. Alternatively if wanted, it could also represent an exemplary case, but then please ask your questions here in the issue tracker. It's still labeled as support so just let us know.

Also if you're missing something in the documentation or whatever, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants