Code: Select all
- SQL support to run queries
- New file creation
Code: Select all
- SQL support to run queries
- New file creation
Hi Billy something like that would be great, but isn't practical unfortunately. It's a similar idea to the dom traversal suggestion from a fair while back and the main pitfall would be any php intertwined with the htmlbillynoah wrote:Hey Jay,
Just a wild thought for a future version that I know may not be realistic but here goes...
What about implementing a jQuery style CSS search position to match elements in tpl files? something like:
<search css="true" position="prepend"><![CDATA["#tab-shipping .form"]]></search>
I think it's pretty self explanatory - finds the element(s) with class "form" inside #tab-shipping and prepends in this case.
Additional position options could be "prepend" and "append" just as they are used in jQuery. "before" and "after" and the rest would still be useful but prepend and append would be key here.
Probably don't need to explain but the idea here is that sometimes you want to match a single or multiple elements inside another with only a certain id or class name.
How hard would this be? I know you are already parsing the xml in the vqmod itself so could this functino be extended to the modified files as well? I often find myself using "index" for things like this (when I need to add something after the third form element for example) but as you know the index can change if other vqmods are involved. A CSS search would be really awesome for modifying tpl files.
Please let me know your thoughts.
Sure - I think I actually deleted the old discussion on it, but basically with having php able to echo content, it can go pretty much anywhere and since php isn't parsed by vQmod, it means it can cause a lot of headachesbillynoah wrote:Sorry if this has been discussed.. would you mind explaining (or sharing link to explanation) about how the php would be a pitfall? Are there any potential workarounds for this?
There are various PHP XML and DOM parsers. However, VQMod doesn't even parse the source file to be modified, it just reads it in as an array of lines.billynoah wrote:Sorry if this has been discussed.. would you mind explaining (or sharing link to explanation) about how the php would be a pitfall? Are there any potential workarounds for this?
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
I started a similar topic at http://forum.opencart.com/viewtopic.php ... 9&p=478386 . Being able to edit output on the DOM level would be extremely powerful feature for OpenCart. The big problem is OpenCart uses javascript with embedded HTML which throws DOMDocument for a loop. The only parser I've found that can handle it is HTML5-PHP but it's very slow.billynoah wrote:Just a wild thought for a future version that I know may not be realistic but here goes...
What about implementing a jQuery style CSS search position to match elements in tpl files?
-Ryan
I know my place...!
Users browsing this forum: No registered users and 35 guests