Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8762311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T15:29:47+00:00 2026-06-13T15:29:47+00:00

I have been struggling since I started developing my own modifier functions to get

  • 0

I have been struggling since I started developing my own modifier functions to get my Smarty environment working the way it should. Specifically I seem to have to choose between being able to use the “built-in” functions or my own but not both. I’m sure there’s something I’m missing and hoping someone can point me to what I need to do.

What I’ve done currently is:

  1. when using the built-in functions — modifiers like capitalize, @debug_print_var, etc. — It seems to just work without needing to specifically point to the directory where these built-in scripts live
  2. when I developed my own scripts — I have two of them now — I had to be explicit about where they were to get them recognized so I added the code below:

code:

 public static function init () {
    $object = new Smarty();
    $object->setTemplateDir ( LG_FE_DIR . '/templates/uncompiled' );
    $object->setCompileDir ( LG_FE_DIR . '/templates/compiled'  );
    $object->setCacheDir ( LG_FE_DIR . '/templates/cache' );
    $object->setConfigDir ( LG_FE_DIR . '/templates/configs' );
    // $object->setPluginsDir ( LG_FE_DIR . '/externals/Smarty/libs/plugins');
    $object->setPluginsDir ( LG_FE_DIR . '/templates/plugins_dir' );

    return $object;
}

as you can see from the commented out line, I also tried to have two “setPluginsDir()” calls to both the default Smarty library as well as my own but it clearly only allows for one directory to be registered.

Any and all help would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T15:29:48+00:00Added an answer on June 13, 2026 at 3:29 pm

    Try addPluginsDir. With this method you can add one or more plugin directories instead of rewrite the existing. http://www.smarty.net/docs/en/api.add.plugins.dir.tpl You can also set multiple directories with setPluginsDir … setPluginsDir(array(DIR_1,DIR_2))

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been struggling all afternoon trying to get a simple mailto: tag to
I love KnockoutJS but have been struggling to figure out the best way to
I have been struggling with a program that calls functions which return strings. I
I am very new to talend and I have been struggling with this since
I have been struggling with this for 2 days. Since I added text labels
I have been struggling with the RestKit since 15 days now. Once I receive
I have been struggling with this for a while now. given a set of
I have been struggling with Core Data sigh so I decided to work this
I have been struggling with setting up an iOS (Objective-C) app which utilizes the
I have been struggling with this error for more than two hours: error: aggregate

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.