NetTalk Central

Recent Posts

Pages: 1 ... 6 7 [8] 9 10
71
Web Server - Ask For Help / Re: How to adjust font size NT Variable
« Last post by rjolda on May 05, 2025, 07:02:43 AM »
HI Jane,
Yes, I realized that NT used variables to set the overall information for the site.  However, I had no clue how to change the variables.
Your information was very helpful.  I actually got it implemented in my custom.css and got it Working!
Thanks,
ROn
72
Web Server - Ask For Help / Re: NetWebServiceMethod as REST - HOW?
« Last post by Niels Larsen on May 04, 2025, 10:20:59 PM »
Thanks Bruce

That's pretty easy. I just took p_web.UserURL and fixed the rest with StringTheory.
Just glad I didn't miss a template option.

/Niels
73
Web Server - Ask For Help / Re: NetWebServiceMethod as REST - HOW?
« Last post by Bruce on May 04, 2025, 09:50:26 PM »
>> But the customer wants it like this:
http://127.0.0.1/WasteInvoice/InvoiceOverview/account/{accountId}/customer/{customerId}

Have you told him how much extra that pattern will cost? I find that putting a price on it lets you determine how much they "actually want it".

>> Does that make sense?

yes.
To do this though you will need to parse the WholeURL yourself, likely in webHandler, setting the values as you interpret them (ie with a call to SetValue).
It's not terribly hard to do, but obviously is a custom approach to both parsing the values, and then redirecting the request to the correct API.

For example, in this URL I presume WasteInvoice is the name of the NetWebService, and InvoiceOverview is the name of the NetWebSericeMethod.
You *may* find it parses that sufficiently to get the call into the NetWebServiceMethod procedure, or you may need to parse it in webHandler.
Once you are in the method, you can then parse the URL further to find the account and customer ID. That's pretty easy to do with StringTheory etc.

Cheers
Bruce
74
Web Server - Ask For Help / Re: NetWebServiceMethod as REST - HOW?
« Last post by Niels Larsen on May 04, 2025, 09:17:38 PM »
I am the one who makes the server but based on the customer's guidelines.
It's basically quite simple. I need to receive two parameters "accountId" and "customerId".
Normally I do it like this: 127.0.0.1//WasteInvoice/InvoiceOverview?account=12345&customer=6789
But the customer wants it like this:
http://127.0.0.1/WasteInvoice/InvoiceOverview/account/{accountId}/customer/{customerId}

Does that make sense?
75
Web Server - Ask For Help / Re: How to adjust font size NT Variable
« Last post by Jane on May 04, 2025, 03:52:45 PM »
Hi, Ron,
Variables were the heart of themes and the "themer" app that Bruce introduced in (NT12??). 
The idea being that you can set something (a color, font size, button radius, etc.) in one place and have the entire web app use those settings.
76
Web Server - Ask For Help / Re: NetWebServiceMethod as REST - HOW?
« Last post by Jane on May 04, 2025, 03:51:07 PM »
Are you making an API client or API server?
Can you post the exact spec of what you're trying to do?
77
Web Server - Ask For Help / Re: NetWebServiceMethod as REST - HOW?
« Last post by Niels Larsen on May 04, 2025, 12:52:15 PM »
Hi Jane

My challenge is that I have to follow the customer's guidelines and
they describe that I have to construct my methods with this syntax.
What you describe I am familiar with and have used in many projects.

Thanks for the input!!
78
Web Server - Ask For Help / Re: How to adjust font size NT Variable
« Last post by rjolda on May 04, 2025, 02:13:38 AM »
HI Jane,
THANKS for all the useful information.  It is sometimes hard to get information on the nuts and bolts of NT.
Especially, I did not think that you could overwrite the variables and their values ( I still have lots and lots of this css stuff to learn...)
Ron
79
Web Server - Ask For Help / Re: NetWebServiceMethod as REST - HOW?
« Last post by Jane on May 03, 2025, 12:03:39 PM »
You can do a REST API without relying on a single REST ID to call it, Niels.

There are plenty of REST APIs I call with multiple parameters, such as
api.whatever.com/v2/appointments/booked?showpatientdetail=false&patientid=1&showcancelled=true&providerid=162
80
Web Server - Ask For Help / Re: How to adjust font size NT Variable
« Last post by Jane on May 03, 2025, 11:57:50 AM »
1. Generally easier to make and verify changes when not in "performance" mode, i.e. when each css and js file is loaded singly into the browser.
2. When you make a change, either do Ctrl+F5 in the browser or increment the Resource version on the Performance tab of the ThisWebServer extension. (I normally set that to my own LOC:ResourceVersion variable, and read that variable from an INI file when the server starts. That way, I can bump the version without recompiling).  That appends a different whatever.css?c=blahblah which forces the browser to refresh its cache.
3. Note that the resourceVersion only works when the "Auto-check cached files" on the webServer template Performance tab is set to TRUE. By default, Development mode sets that to FALSE, so I always remember to change it back to TRUE.
 
4. Leaving aside the above fluff, where are you making the change? (You mention seeing the size setting in two files.)
I normally do that in my own custom CSS file (which I also do not include in the gzip stuff - untick the "Is included in THEME.CSS checkbox.)

In my custom CSS file will be a :root section to either override some of Bruce's defaults and/or to add any of my own variables that I'll use in my custom CSS.  Something like:

Code: [Select]
:root{
--softFontColor:#707070;
--leftBarColor:#FF5A87;
--leftBar:var(--leftBarColor) 6px solid ;
--darkTitleFont:"DarkTitle"; /* "DarkTitle" */
--normalTitleFont:"RegularTitle";
--font-family:"Open Sans","Segoe UI",Tahoma, Verdana, Arial, Helvetica, sans-serif;
--label-floating-top:calc(var(--entry-height)*.24);
--font-size:10pt;
}

My own trial-and-error.  HTH.

Jane
Pages: 1 ... 6 7 [8] 9 10