Sign in

what is the variable for the domain.tld of my site

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #3127
    JOduMonTJOduMonT

    Hi;

    In my override theme I want to insert via variable a media

    • @website.url – site URL (it can contain index.html at the end in some cases – such as during website settings or in preview mode),

    this variable will work if it was returning only the domain.tld without the index.html

    I didn’t found in the doc and also by trying different variation.

    from my understanding it would be something like @config.domain but when I preview it don’t work.

    so what is the answer doc ?

     

    #3135
    JOduMonTJOduMonT

    it is not @config.sitedomain neither

    #3136
    BobBob
    Support

    All global variables are listed on this page https://getpublii.com/dev/website-global-variable/

    What exactly do you want to achieve?

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #3137
    JOduMonTJOduMonT

    I want

    • @website.url – site URL (it can contain index.html at the end in some cases – such as during website settings or in preview mode),

    without index.html

    such as I’ll be able to reach my image located in Documents/Publii/sites/website/input/media/website/myimage.png

    #3147
    BobBob
    Support

    If I may suggest, upload all the images you want to use in the theme to the assets folder  (Documents ▸ ⁨Publii⁩ ▸ ⁨sites⁩ ▸ ⁨YOUR_SITE ▸ ⁨input⁩ ▸ ⁨themes⁩ ▸ ⁨YOUR_THEME ▸ assets ▸ images)
    Then you can grab the files via {{@website.assetsUrl}}/images/your_image.png

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.