Join the Webstudio community

Home
Members
mustafasheikh
m
mustafasheikh
Offline, last seen yesterday
Joined December 13, 2024
Posting this request again.
How can we implement a language switcher please.
Content is from Hygraph with languages enabled

In WS, English default pages are on root and duplicated translation pages are in folder AR

URLs are set up fine "website.com/ar/news" (for arabic)
"website.com/news" (For default english)
Content is appearing correctly too.

Need to implement a switcher in navigation that directs to /ar/ version without taking user back to homepage

It's for a large-ish site we're rebuilding and wanting client to move from WordPress to WebStudio . It is unfortunately time-based so need to finalize this soon so we don't have to continue new site on Wp again

Thanks a lot
5 comments
m
O
When importing HGph contemt, we get all elements that can be styled on the front-end. The two I found missing were
  1. Video: Most CMS don't have video copy/paste(such as WP editor has) but in hygraph we can use YT embed link, however no way to control it in front-end using WS
  2. Table styling. All elements are there in Hygraph template except table.
4 comments
m
J
O
Suggestion to have a feature to Lock a token so if a user is wanting to make local updates on an element, they don't by mistake edit the parent token.
This is a feature I have noticed in some other builders too (with a small lock icon)
2 comments
O
Does anyone know when was WebStudio launched. I am writing an article about it (and soon a YT video) on how WS does things diff to other.

I have read WS blogpost here but was it 2023 or 2024 that WS launched
Thanks
5 comments
F
O
m
Has anyone implemented a lang switcher that works without sending user back to home page. This is my setup:

Two languages AR and EN (EN will be default)

  • CMS data from Hygraph. Enabled Localization of 2 Languages (AR / EN) and CMS content has fields for (title, content) for both languages
  • Then I pull this data in Webstudio via GraphQL.
  • I have 2 individual GraphQL queries for each language ( localizations(locales: ar) and locales: en - respectively)
  • in WS, I have all pages on root (default language english) and then a folder called "AR" in which Arabic copies of the same pages (including CMS pages such as Post and Post directory)
All this works fine until here. My Directory shows correct content in Arabic (via Locales:ar) and english (via locales:en) and my post detail shows correct content too.

so example my URLs are like this
example.com/news/hello-world (For en post detail page)
example.com/ar/news/hello-world (for ar post detail page)
example.com/news/ (En posts page)
example.com/ar/news/ (ar posts page)

Rest of the pages are static so no hygraph required for that.

Now the question:
How do i correctly implement a lang switcher in header slot
So that, user can easily switch languages from one click while staying on the same page, but get directed to "/ar/slug" when clicked on AR or "/slug" when clicked again on EN in the switcher

And set Language in page settings dynamically too (if possible but not mandatory)

Thanks
3 comments
m
J
(General suggestion)
I see 2 elements by the same name "Select"
Obviously, one is for Dropdown (content based) other is for form selection dropdown (form based) I assume.
But might be nice to have differentiating names I guess? or some way of differentiating
5 comments
H
O
m
mustafasheikh
·
O
Solved

Plan question

I have existing WS Pro - I want to buy the Tier1 Drop (from email)
How can i upgrade my existing WS account to that (and pay the difference) please and thankyou
1 comment
O
Besides YT and Vimeo, will there be support to link other 3rd party linked videos?
(Gumlet, Cloudinary, and others provide a direct mp4 link which is very handy)

A lot of clients are getting conscious of avoiding YT / Vimeo uploads for different reasons (either they have a DAM with their videos or they have privacy concerns with YT) and in such cases we use other video hosting platforms. Would be nice to have a support of adding custom video link as background (similar to currently YT and Vimeo).
Other general observation I noticed Gumlet (or similar) hosted videos load WAY faster than Vimeo., without any additional scripts.

(Screenshot ref from Bricks Builder that we've used for 90% of sites so far)
3 comments
O
m
What would be the right way to add max character limit to the excerpt and then "..."
Thanks
5 comments
O
J
m
B
Using Radix menu - is it normal that Sheet trigger is always visible behind the Sheet overlay. With 100% opacity as well, it does get hidden when overlay is open and Close icon appears on top of it. Something i am missing here? thanks
1 comment
D
Hello. So my Pro trial expired today (5nov) and i got this email to get YEARLY license at discounted price.
Which I really like, and happy to full year instead of monthly at a discounted price.

But when i try to use the promo code. It gives me error that it's expired.
I got the email 2 hours ago. I rushed home from work to make this purchase. And my guess is that I am in NZ time (which is ahead) hence the code is not working for me.

How can i get a new code and make this purchase as id really like to. Thankyou
4 comments
J
t
New to expression editor. How can we add some static text before the dynamic value in expression editor (For example: Published on)
5 comments
J
J
m
B
In this screen record, you'll notice the Slot cannot be moved outside of the Nav menu. It can be moved anywhere within menu but not outside. Is that normal behavior or am i missing something

Thanks

(Use case: Want to use the navigation dropdown as slot and display in other parts of the website)
7 comments
m
B
What's an easy way to add svg icon (code) to some of the menu (radix menu) items please (as in this example)
Thankyou
1 comment
s
I have rendered posts directory page that brings all posts from hygraph (from the tutorial)
I then created same 'Data variable' on homepage, and brought posts on homepage too

BUT on homepage i want to display maximum 3 posts (unlike on Directory i'll display all posts)
How can i limit it to maximum 3 posts

(P.S: I tried adding "[1]" after .data.data.posts but it shows error

Thankyou
3 comments
m
O
Hiya, is there a way to display the Page name (for heading of each page) using expression editor or any other way

(in simpler words: i want to display the name of the page as the heading on top. But instead of writing it static text, want to pull the 'Page name' (Set in page settings) as the heading.
Thanks
2 comments
m
O
Is there a way to rename previously created variables (without having to delete and recreate them) especially if they're used site-wide —Thankyou so much

Another thought: Also it might be good to have a place to see all variables created (especially useful in case when a library is imported from elsewhere?)
3 comments
m
B