NetTalk Central

Author Topic: Style sheet from database  (Read 3081 times)

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 431
    • View Profile
    • Email
Style sheet from database
« on: June 07, 2013, 09:54:17 AM »
Hi
I need to insert a stylesheet from a text field in a database.
But I can not figure out where to insert the sheet between the head tags.
Does anyone have experience with this?

Regards Niels

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Style sheet from database
« Reply #1 on: June 09, 2013, 04:54:07 AM »
more context please Niels...

so, usually you add a style file to the <head> section of a page. This is done for you by NetTalk using one of the template settings in web server (the list of style files.) Now that list can contain variables, but those variables need to be loaded before it's used.

This will add that style to the whole site (presumably for all users.)

Now if you want to add the style for just a specific page, or control, or user or whatever then I need to know more to give you a specific answer.

cheers
Bruce

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 431
    • View Profile
    • Email
Re: Style sheet from database
« Reply #2 on: June 09, 2013, 11:11:57 PM »
I rephrase. I would like to place plain text in the header and not a link to a style sheet.
I can see that you are using AddStyle procedure to add the shortcut in the header but it does not work in my case.
Is there a way that allows you to write directly in the header?

I thought that when I wrote XHTML in "Before / head" in a NetWebPage, it also showed up in the associated browses and forms, but it's not - I'm sure there's something I've misunderstood...

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Style sheet from database
« Reply #3 on: June 10, 2013, 01:23:33 AM »
plain text <style> sections can be anywhere in the page, they don't need to be in the <head> section.

cheers
Bruce

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 431
    • View Profile
    • Email
Re: Style sheet from database
« Reply #4 on: June 10, 2013, 02:01:57 AM »
There you see. You learn something new every day  :D

Thansk Bruce!