Hi, i want my mobile site to be different to the desktop version. instead of buttons expanding strips that are hidden on the desktop version, i want the buttons on the mobile editor to link to a page. is this possible, and if so, how?
thanks in advance!
Hi,
The formFactor property will help you deal with that. Once you know what kind of device is being used to view your page, you can use some “if” logic in your buttons to alternately do different things. Use the to() function to go to a different page.
Thanks. Will adding code into the mobile site apply to the desktop? it doesn’t need to be an external hyperlink, just a link to another internal page on the site. It’s easily done on desktop, and on buttons it can transfer over but it seems like it’s just not there on the mobile editor.
Like Anthony has already said in his reply to you.
Just use formFactor and write your code so that if it is desktop then the button goes to one link.
Then do the same but if it is mobile and have the button go to the other link instead.
Also, you will need to make sure that the mobile only parts of the site or page are set to hidden on load when setting it up in the desktop editor.
Plus, if this happens on just one page then simply add it to your page code. However, if it is being used across your site, then you should be placing it in your site code.
Just remember that this will not work on preview, it does however work on the live published site.
Similar to how you do a mobile only homepage as shown here: