andrewbauer Posted April 25, 2022 Share Posted April 25, 2022 Hi, I've always built very basic websites for myself but never used ProcessWire before and now need to make some changes to the company website I work for. What they've asked me to do is insert a widget (no files needed but just a bunch of HTML code that pulls data from an external site too, such as images, etc.). However, I'm having trouble with this and can't really find anything that matches what I need. I've tried copying all of the code into a content box but all that does is insert the images, the formatting is wildly off, the sizes are wrong and none of the links work. I then tried clicking the Source button within the content section and adding it in there. Now, that works much better in the sense that all of the images are the right size, etc. however there seems to be a limit on how much HTML can be inserted into the Source box, and as a result the end of the code doesn't fit and therefore the widgets don't work as they should. I'm really new to this and wonder if anyone knows of any add-ins or anything I need or can use, or a different way I should be going about this. I appreciate it might be difficult without seeing the website or the code, which I can't really provide, but just hoping someone might be able to relate to what I'm experiencing and might have a suggestion on how best to move forward. Thanks in advance! Link to comment Share on other sites More sharing options...
Ivan Gretsky Posted April 25, 2022 Share Posted April 25, 2022 Good day, @andrewbauer! I suggest you take a little time and dig deeper into how ProcessWire works. After that your question will be solved by itself) You can start with one of these written tutorials or watch this rather old, but still conceptually relevant video. Link to comment Share on other sites More sharing options...
Klenkes Posted April 25, 2022 Share Posted April 25, 2022 Or if you want to jump right into it, you can always read about HannaCode. It's like Shortcodes in WP. Just don't forget to add the TextFormatter to your field! Link to comment Share on other sites More sharing options...
dotnetic Posted April 25, 2022 Share Posted April 25, 2022 You can not enter JavaScript into the CKEditor, as it is stripped out by the HTML purifier. It could also be a security problem if the editor allows this. I suggest you add your widget code on the site/templates/pagename.php where you need it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now