- This topic is empty.
-
AuthorPosts
-
20th September 2020 at 6:26 am #3090Pastor AndresModerator
We are using a css switch to select language on our App Content pages. It works everywhere except on the Giving page. The failure mode seems consistent with trying to use it within a
tag. Is there, by any chance, atag around the user editable portion of the Giving page?
If so, could it possibly be removed?I’m just guessing here but I can’t think of anything else that would cause the Giving page to not work when Home, Groups, and all of our own are working fine.
20th September 2020 at 9:06 am #4776Andy MoyleKeymasterIt’s no different to any of the other pages. Can you make it public and I’ll have a look and see why it’s not working (And let me know the Spanish for giving, so I know what to click!)
20th September 2020 at 3:13 pm #4778Pastor AndresModeratorIt’s the App Content page… I think the only place to see it is on the app right? I believe it is public. I might be misunderstanding.
20th September 2020 at 11:00 pm #4780Andy MoyleKeymasterClever stuff your CSS! Didn’t know you could do that. I’ll email you the home page and giving page HTML that I have grabbed and then whoever came up with the CSS can advise!
20th September 2020 at 11:18 pm #4782Pastor AndresModeratorIf your thinking of the language flags that show and hide content, that is a little trick you can do with radio buttons and :checked psuedo class. It was fun to get it working but what I need is a javascript to set a global variable that can be checked each page where the language switch is needed. That way the user doesn’t have to keep selecting their language on every page.
Thank you for the HTML. I really appreciate it.
20th September 2020 at 11:39 pm #4783Andy MoyleKeymasterClever.
Instead of a global variable use the local storage in Javascript. (As the content from app-content post type is rendered afresh for each page, so the global variable will only work on one “page”)window.localStorage.setItem(‘STORAGENAME’,variableToStore); – serialise an array if you want to store an array!
window.localStorage.getItem(‘STORAGENAME’);
The storage name “language” is already in use as is “locale” so don’t use those as it will break the app
20th September 2020 at 11:49 pm #4784Pastor AndresModeratorThank you! That’s a big head start!
24th September 2020 at 7:05 am #4785Pastor AndresModeratorHey Andy, just a quick note to say thank you for the headstart on the Javascript. God gave me a great solution that is working well. Check it out.
-
AuthorPosts
- You must be logged in to reply to this topic.