Re: [Cppcms-users] How to link external URL with CppCMS?
Brought to you by:
artyom-beilis
From: Manveru <ma...@ma...> - 2018-10-09 15:50:36
|
Geez, people. Use: response().out() << R" <https://en.cppreference.com/w/cpp/language/string_literal>html(<a href=" https://www.googl.com">Google</a><br>)html"; It's it neater? czw., 20 wrz 2018 o 17:07 Asog <ret...@gm...> napisał(a): > This works too, but not sure about neatness: > > response().out() << "<a href='" << "https://www.google.com" << > "'>Google</a><br>"; > > On Thu, Sep 20, 2018 at 10:59 PM Nazim Can Bedir < > naz...@ne...> wrote: > >> Hi, >> >> You forgot that you are writing code in C++, so you need to start and end >> string literal with " (double quote), and escape the inner quotes. >> >> response().out() << "<a href=\"https://www.google.com\">Google</a>"; >> >> Regards, >> Nazim Can. >> >> -- >> С уважением, >> Назым-Джан Бэдир >> >> 18:24, 20 September 2018, "hoang nguyen via Cppcms-users" < >> cpp...@li...>: >> >> Nazim, >> I tried the following code as you said and it failed: >> >> response().out() << <a href="https://www.google.com">Google</a>; >> >> What am I missing? >> -------------------------------------------- >> On Thu, 9/20/18, Nazim Can Bedir <naz...@ne...> wrote: >> >> Subject: Re: [Cppcms-users] How to link external URL with CppCMS? >> To: "cpp...@li..." < >> cpp...@li...> >> Date: Thursday, September 20, 2018, 5:07 PM >> >> Hello, >> 'url' template command is >> used to output address of url_mapper routes. If you want to >> create link for an external URL, you just need to use usual >> HTML; i.e. >> <a >> href="https://www.google.com">Google</a> >> Regards,Nazim Can. >> >> -- >> С >> уважением, >> Назым-Джан >> Бэдир >> >> 12:45, 20 >> September 2018, Asog >> <ret...@gm...>: >> >> >> Hello, >> I got my CppCMS page >> working following this >> tutorial >> (full >> code). However, it >> doesn't show how to link to an outside URL (i.e., >> www.google.com). >> Can someone point out to me how it can be done? TIA. >> >> >> >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> -----Inline Attachment Follows----- >> >> >> -----Inline Attachment Follows----- >> >> >> >> >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > -- Manveru jabber: ma...@ma... gg: 1624001 http://www.manveru.pl |