function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Mixed HTML and Visualforce

Trying to poll some opinion here. Got a standard VF page that I am quickly trying to uplift to be decent on Salesforce1. This document looks promising:

Now. It goes to great lengths to say what not to use in terms of pageBlock and pageBlockSection (which I have in my code that was inhereted), but what on earth are you meant to use in its stead? <div> etc?

For someone who isn't really an HTML head, it would be nice to have a little leg up.
What I usually do is render my visualforce page in a browser on a pc, and right click and "View Page Source". The source will show the page in HTML, see how your page is translated, maybe this can help?
Source is far far far too complex to discipher.

Starting to think this is going to be a touch more complex than initially thought and little in the way of resoure to figure out how to do it.

I need to replace things like pageBlock and pageBlockSection/pageBlockButtons with HTML equivalents, which will also include the standard Salesforce formatting. Remarkably challenging for someone like me.
I was thinking last night: is my approach of trying to do this all on one page the wrong approach?

So when I was trying to recode a page to be Salesforce1 friendly, I rapidly lost all the formatting, the Salesforce CSS. I suddenly thought. Should I be recoding this page, or should I be making a new page?

The rationale is that the users of said page access the desktop version when on the desktop, but when on mobile that version is disabled and they have the mobile version to use.

Does this sound like it is the right way forward? 

In fact, would be BEST BEST option be to code two code paths. Using an IF to go desktop one way, salesforce1 the other?