Page 1 of 1

Card HTML

Posted: Thu Nov 24, 2022 9:19 am
by Spypick
Dear Pablo and fellow-users,

First of all, thank you very much for the new version of WYSIWYG, whose new additions are great.

I have a question about card containers. My website has many pages, on which there are many card-containers set to "carousel mode." Some cards are recurrent and the text they contain need to be modified regularly. My problem: changing the text on each separate card takes ages and I'd like to be able to change the text on only one card/one place, and automatically the other cards change (with the same new text) at once. My guess is I need to use the "Add HTML" option on the recurrent cards in order to base the card's content on some kind of Master-card on a separate page, but I'm not sure whether that's the right way to go and what to type in the HTML field... Do you think you could provide me with some help, please? Many thanks and have a nice day.

Peter

Re: Card HTML

Posted: Thu Nov 24, 2022 10:02 am
by Pablo
You cannot do this via HTML, the text can only be changed via the properties.
But you can take a look at the CMS card, which works in combination with the CMS tools. This can be updated online.

Re: Card HTML

Posted: Fri Nov 25, 2022 10:32 am
by courriere
You can do that by setting a PHP variable, for example $thistext containing HTML code.
And in your Card you can define a HTML entry like this : <?php echo $thistext; ?>

It works for me.

Re: Card HTML

Posted: Sat Nov 26, 2022 8:32 am
by Spypick
Dear Pablo and Courriere, thank you very much for taking the time to reply, I appreciate it :) I'll have a look at your suggestions right now. Have a nice day :)

Re: Card HTML

Posted: Sat Nov 26, 2022 2:34 pm
by Spypick
Dear Courriere,
Once again, thank you for taking the time to try and help me. I'm not familiar with PHP variable and I'm not sure I understand what you are trying to help me with. Would you mind explaining how to do it step by step in more details, please? I'm far from being an expert haha. Many thanks for what you can do :)
Peter

Re: Card HTML

Posted: Sun Nov 27, 2022 8:29 am
by courriere
Peter, it's very difficult to explain how to proceed if you don't know PHP langage, and this forum is not the place to do that.
Perhaps it could be done by using private email, but the best for you is to meet somebody in your neightboroud who knows PHP.

Re: Card HTML

Posted: Sun Nov 27, 2022 9:54 am
by Spypick
Dear Courriere,
Thank you for your reply. I understand. You're right, this forum isn't the place to do that. If you think it might not be too complex to give me instructions to achieve what I'm desperately trying to do, here's an email address you can reach me on: doyouliketea@hotmail.fr I'd be happy to remunerate you for your service. I'm from a really small town in the countryside where I haven't found anyone who knows PHP or web development, haha. No worries if you don't have the time to help me out, I appreciate you giving me a few pointers already. Best regard,
Peter

Re: Card HTML

Posted: Sun Nov 27, 2022 10:19 am
by alan_sh
If you could show us your web site, pointing out which cards need to all be updated, we may have some ideas.

Alan

Re: Card HTML

Posted: Sun Nov 27, 2022 10:40 am
by Spypick
Dear Alan,

Thank you for your message. Here's a simplified demo on this page:

https://www.blueplaneteer.com/demo/demo1.html

The final website shall contain many bilingual publications in many different languages, with the possibility to access the translation from a simple swipe (hence the use of the own carousel). I would like to be able to have some kind of "masterpage" that contains all the texts in their respective language: the French text, the English text, the Spanish text... etc. And then, for example, on the page of the French-English publication, the French card is linked to the French text while the English card is linked to the English text. In another publication, it will be the Spanish text and the French text... The advantage would be for me to simply input the text in each different language in ONE PLACE only, and all the premade cards would show the right language in the right place automatically, if that makes any sense :P

Many thanks in advance for any ideas you may have :)

Peter

Re: Card HTML

Posted: Sun Nov 27, 2022 8:40 pm
by alan_sh
When I click on that link, all I get is a few lines of text.

What am I supposed to be looking at?

Maybe if you share the .wbs file, we could see how you are attempting to create the page.

Alan

Re: Card HTML

Posted: Mon Nov 28, 2022 9:38 am
by Spypick
Dear Alan,

Here’s a link to a very simplified .wbs version of the project:

https://drive.google.com/drive/folders/ ... sp=sharing

- The “Bilingual publication” page contains a card container set to “Carousel mode” in which there are 2 cards: “English card” and “French card”
- There are 2 other pages on the website: “English text” and “French text.”

I’m trying to find a way so that when I modify the text on the “English text” page for example, it automatically modifies the text within the “English card” on the “Bilingual publication” page. This will be essential due to the number of languages and the length of the publications the final website shall have.

Here are some ideas that I haven’t managed to successfully implement:
1. In the “English card”, use the HTML entry to link the content to the “English text” page (whether the text is in the form of a card of a simple text)
2. On the “Bilingual publication” page, not put any card in but create a reference to the card located on the “English text” page
3. Use some kind of PHP echo?

Many thanks for taking the time to try and help me out. I really appreciate it. I hope I have provided you with enough information.

Peter