Is there a method to add HTML Markup eg before </head>

Firstly well done Jeremy XWAY looks great and I like the way it works & can’t wait to seem the rest of it as it rolls out.

I have read the manual and notice that the HTML Markup from the menu hasn’t been implemented yet.

Is there a workaround for this heres an example I have in one of my Freeway sites for the favicon which I add before

Sorry if this is a stupid question but I use things like that a lot.

Cheers

Anthony

Hi Anthony,

There isn’t a way to do that at present, I’m afraid. (Unless you edit the source code, but Xway will overwrite that next time you publish.)

We’re planning to add generic HTML markup in the next beta version of Xway.

Jeremy

On 12 Nov 2019, at 11:00, email@hidden wrote:

Firstly well done Jeremy XWAY looks great and I like the way it works & can’t wait to seem the rest of it as it rolls out.

I have read the manual and notice that the HTML Markup from the menu hasn’t been implemented yet.

Is there a workaround for this heres an example I have in one of my Freeway sites for the favicon which I add before

Sorry if this is a stupid question but I use things like that a lot.

Cheers

Anthony

Hi Anthony,
Although you can’t currently add markup items to your Xway page output you can add a simple JavaScript function that will add these for you. I did something similar on this test page I put together last week although the code I used was quite specific to the items I wanted to load. Specifically the script loaded jQuery and the Font Awesome fonts.

Below is a rewritten function that should work with any markup items you want to add to your page. Simply copy and paste the code below into your Xway inspector in the JavaScript Markup section.
The part you will need to edit starts with the ‘Add your code here’ comment.
Each block of code you want to add should be in the format;

xAdd(‘Your HTML code here’);

with ‘Your HTML code here’ obviously replaced by the code you want to add.
By default this will add the code to the page . If you want to add it to the page simply add on a second parameter called ‘body’ like this;

xAdd(‘Your HTML code here’,‘body’);

Just make sure that you don’t add single quotes (') in your HTML code and you should be OK.

function xAdd(e,n){var d=“head”;“body”==n&&(d=“body”);var t=document.createElement(“div”);t.innerHTML=e,t.querySelectorAll(“*”).forEach(function(e){document.getElementsByTagName(d)[0].appendChild(e)})}

window.onload = function(){
/* Add your code here */

/* Add code to the page head */
xAdd(‘’);

/* Add code to the page body */
xAdd(‘This is a span added to the page body’,‘body’);
}

Hi Tim,

Thanks for the code snippets!

Although you can’t currently add markup items to your Xway page output you can add a simple JavaScript function that will add these for you.

I think you mean “can’t currently add generic HTML markup”

You absolutely can add markup items.

Jeremy

Hi Jeremy

That’s brilliant, thanks very much. I was concerned that would have limited me too much.

cheers Anthony

On Tue, Nov 12, 2019 at 07:02 AM, Jeremy Hughes wrote:

You absolutely can add markup items.

Sure, but only to the page body (unless I’m missing something).

You absolutely can add markup items.

Sure, but only to the page body (unless I’m missing something)

In Xway (and Freeway) terminology an item is a box that is added to a page, and a markup item is a box that contains markup (“Insert/Markup Item” in Xway and Freeway).

What you’re referring to (in Xway/Freeway terminology) is generic HTML markup (“Page/HTML Markup” in Freeway).

Jeremy

Hi Tim Sorry I meant to thank you as well.

Hi.

I like to add the google analytics thing into my website. i did try to figure it out, but it didn’t work yet. kan anyone tell me how i should fix that step by step?

www.vloerengilde.nl