Site Builder widget editor problem

alt=
@honeyhoney
9 years ago
5 posts
System: win 8.1 / latest firefox and chrome

1. Entered 2 lines in editor mode
2. When switching to code mode, for less than a second the correct code Line 1Line 2 gets displayed, then kind of a refresh happens and something totally different shows up.

Actually, this is cached code from my first try, but neither a system nor a browser refresh is forcing the code to update correctly


we.png
we.png  •  24KB


updated by @honeyhoney: 05/13/15 12:09:21PM
brian
@brian
9 years ago
10,148 posts
Code and HTML are for 2 different uses:

HTML - this will look what you have entered
Code - this is for Smarty template code

So you would not switch to the "code" tab when entering HTML. If you want to see the raw HTML, click on the "code" button in the editor menu bar.

let me know if that helps.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
@honeyhoney
9 years ago
5 posts
No, not really. I'm a little stupid, it seems.

What I've learned so so far:
If I need a construct like
--------------------------
{if jrUser_is_logged_in()}
this line is visible for logged in users only
{/if}
--------------------------
I have to use the Code Tab. The same code entered in the editor tab appears literally, which makes sense to me.

On the other hand, something like {jrCore_list module="jrAction"} entered in the EDITOR tab is NOT displayed literally, but interpreted by Smarty. And that's where I can't follow anymore.
updated by @honeyhoney: 04/10/15 06:50:34PM
derrickhand300
@derrickhand300
9 years ago
1,353 posts
Think of it like this...
The 1st editor is WYSIWYG editor like all drag/drop style sites ( but allows some embedding with the embed tool)
Like most WYSIWYG editors there is also a place to switch to html code in the editor -usually that is located in a tab that looks like this
<html>
( ebays editor is like this- but in the jamrooms editor they omit the letters 'html" so the same button looks like this

< >
So if you look in the icons in the editor you will see it- if you click it -it will allow you to edit the html code in the WYSIWYG editor

Jamroom-because it also has smarty has a 3rd place to enter code- and its the one that is a tab written "CODE" in the widget

This third place accepts both html AND Smarty- This is where you will add your smarty code and html if you like

Example would be if you made a template and wanted to add it to the code in the widget you would use

<div class="panel panel-primary">
      <div class="panel-heading">
        <h3 class="panel-title"><span style="color: #ffffff;">Welcome To My Template</span></h3>
      </div>
      <div class="panel-body">{jrCore_include template="MY TEMPLATENAME.tpl"}</div>

(notice I used both html and smarty here)

Important point-You can add HTML-SMARTY or a contamination of both here
You would add this using the CODE tab of the editor

So you have
*WYSIWYG
* tab-which is html side of the WYSIWYG
and
*CODE- where you add Smarty or html or a combination of both


NOW to confuse you further try to remember you can have totally different code in the WYSIWYG editor and the CODE editor... BUT only the one you save it as is the one that will be rendered. THE CODE YOU "DIDN"T" SAVE IT AS WILL STILL REMAIN THERE FOR FUTURE REFERENCE BUT WONT PUBLISH TO THE SITE

Many times I will use the WYSIWYG editor to add images and other items-THEN- I will go to the editor and copy the source html of what is in the WYSIWYG editor- and paste it into the CODE editor and add my Smarty to it there- the first few weeks I thought it was totally retarded to leave the code in both areas- if only one was being used- but after I started using it like this I decided it was brilliant AND really useful because it saves me from having to write the html code..I just create it with the WYSIWYG editor then copy/paste it over and add my Smarty code to it ( like the above example)

Took me awhile to wrap my mind around this also- I hope this is helpful
updated by @derrickhand300: 04/10/15 08:41:57PM
alt=
@honeyhoney
9 years ago
5 posts
Thank you Derrick for taking so much time and giving me that detailled explanation.

"NOW to confuse you further ..." Exactly that's where my confusion started. Next was clicking the Embed button and not getting something embedded but a Smarty instruction (in a WYSIWYG editor!?!)

Even more, I had a bad experience already yesterday when saving a simple color change of Elastic's "override_mobile.css" from the "Untagged" tab in the style editor (after that the skin became completely corrupted) - so I think I'll better stay away from all these user-friendly meant, but not really fool-proof and partly irritating tools and better start working on tpl and css files directly.

The idea, that hours of coding may be lost or hidden somewhere deep in a database is making me feel not very comfortable. No: my friend remains my editor and a locally saved exact copy of what I did. :)
brian
@brian
9 years ago
10,148 posts
Just want to add that we are very close to a completely new Site Builder - I would recommend NOT using the existing one until the new one is out.

Of course you always have the most control by editing the templates and CSS directly.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
derrickhand300
@derrickhand300
9 years ago
1,353 posts
Its really pretty safe after you understand it- I am hoping we do not lose this functionality in the updated version

When you embedded in the WYSIWYG editor you were actually using the jrEmbed function which I think only works on a few items-Polls being one of them- they have to be embedded in the WYSIWUG editor- if you look at the code after it embeds you will see it uses
[jrEmbed...]  and not the {...} brackets..
when you see the square brackets you will know it was embeded using the WYSIWYG editor and that code WONT work in the CODE tab

Also a note- Michael has default settings on these widgets and they are set to back up nightly and it keeps 30 days worth of backups- you will notice these in the evenings when working and checking your activity log...its will say something like "site builder back up completed"...they are always there an available if you lose/break something

I think that
You can fly a kite and you can fly an airplane

* you have less control over the kite because you have fewer controls but its much easier to fly
* you have more control over an airplane because you have more controls-unfortunately they are complicated making it difficult to fly without training

The most successful Site Builder will be the version that provides the most functionality with the least demand for experience.

I think finding that happy medium is the hard part
updated by @derrickhand300: 04/11/15 12:38:47PM
Asil
Asil
@asil
9 years ago
41 posts
brian:
Just want to add that we are very close to a completely new Site Builder - I would recommend NOT using the existing one until the new one is out.

Sweet!
updated by @asil: 04/12/15 05:57:43PM

Tags