I am a long-time RW use (now on Classic) and my membership site depends heavily upon executing snippets of code within the text of many pages. In discussion with a developer he mentioned that;
“The only thing I find missing from Elements compared to RW is the ability to put code inline embedded in text. In RW you can just type code in a paragraph such as:
You are logged in as <?php echo $slusername_html; ?> and you are welcome here.
which is not directly possible in Elements as far as I can see.”
Does anyone have any comment on this? I run an education website and frequently use such things to handle the many different students categories that use the site.
Thanks Dan. To clarify my issue a bit more. My site has perhaps 300-500 pages (I haven’t counted in a long time), and I have code embedded multiple times in every page - sometimes just a snippet of HTML, sometimes quite a bit of PHP.
If every one of these code snippets requires a Custom Component there will be thousands of them. And from my superficial understanding of Elements, these will all be taking up space in the Custom Component section of the sidebar. Is this the only way?
In RW Classic it is easy to embed code and then use Format → Ignore formatting. Is this something that can be done in Elements?
Thanks Ben. While there are some snippets of code that are similar across pages, many/most are unique. We run an educational site and this involves lots of online quizzes/exams, which have many unique components (there’s a few hundred of these).
We also have different categories of student, studying different courses, so we need to change the information displayed on the fly depending upon the student that is logged in. We use Sitelok to keep track of the membership side of things, but we have lots of PHP in the pages that is used to access the SQL database and then configure the information appropriately, depending upon the type of student.
As I mentioned, my concern is that creating a Custom Component for every one of these will quickly overwhelm the Elements library and make it too unwieldy.
Elements is super super flexible and can absolute do what you need, without creating 100’s of custom components…
You can re-use custom components, the way to do this would be to create drop zones, or properties. Here’s a VERY simply example of a reusable html custom component.
Custom Components are really powerful and you could improve your site by building a few to make your life easier, especially if you have any similar content you use throughout your site. We have a full API that allows you build anything you want