Jump to content

Search the Community

Showing results for tags '$template'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. I’m trying to use the $template->name by declaring this in "_init.php": $cssFile = $template->name . ".css"; … and I then have this in "_main.php": // Use custom CSS-file if that file exists. <?php if(is_file($config->paths->templates . "styles/$cssFile")) { echo "<link rel='stylesheet' type='text/css' href='{$config->urls->templates}styles/$cssFile' />"; }; ?> However PW throws this notice: Notice: Undefined variable: template in /Users/claus/Sites/ProcessWire/site/templates/_init.php on line 29 Notice: Trying to get property of non-object in /Users/claus/Sites/ProcessWire/site/templates/_init.php on line 29 // Use custom CSS-file if that file exists. Do I have to define $template->name? I thought that was a built-in function?
×
×
  • Create New...