• Combining Modifiers
  • {config_load}
  • {if},{elseif},{else}
  • {ldelim},{rdelim}
  • {setfilter}
  • Config Files
  • Debugging Console

{assign}, {$var=...}

{assign} or {$var=...} is used for assigning template variables during the execution of a template .

Attributes of the {assign} syntax

Attributes of the {$var=...} syntax, option flags.

Note Assignment of variables in-template is essentially placing application logic into the presentation that may be better handled in PHP. Use at your own discretion.

The above example will output:

{ assign var = "name" value = "Bob" nocache } { * or * } { assign "name" "Bob" nocache } { * short-hand, or * } { $name = 'Bob' nocache } The value of $name is { $name } . The above example will output: The value of $name is Bob.

Variables assigned in the included template will be seen in the including template.

The template above includes the example sub_template.tpl below:

You can assign a variable to root of the current root tree. The variable is seen by all templates using the same root tree.

A global variable is seen by all templates.

To access {assign} variables from a php script use getTemplateVars() . Here's the template that creates the variable $foo .

The template variables are only available after/during template execution as in the following script.

The following functions can also optionally assign template variables: {capture} , {include} , {insert} , {counter} , {cycle} , {eval} , {fetch} , {math} and {textformat} .

See also {append} , assign() and getTemplateVars() .

404 Not found

404 Not found

Smarty: Concatenation of variables inside block parameters

In Smarty sometimes you need to concatenate 2 variables and pass it as a single variable inside a block. But the placeholder won't allow any expected PHP syntax

You want to accomplish something like:

But, the dot in smarty is for array access, so, what about...

No. It does not work either. Ah! Let's try a modifier :

Aha! That's the solution!

Dedicated to my friend Sambel, no pun intended!

DEV Community

DEV Community

dgloriaweb

Posted on Nov 25, 2021 • Updated on Sep 14, 2022

Php Smarty template - assigning complex content to variables

In some cases Smarty doesn't allow you to assign values to variables just like that. For example in foreach loops. Then the following solutions can work. 1, Assign a simple text with variables:

explanation: Smarty's smart enough to replace value of variable within quotes.

2, Assign special characters or longer text:

explanation: the capture tag allows you to add text without quotes so it's readable. Variables have to be in {}.

3, Do ternary operation and assign value:

explanation: need to be aware of the brackets, but works fine. Normal brackets contain the condition.

Ternary operator concatenate variables with string (if the parentname is set, concatenate variables to a new string)

Top comments (0)

pic

Templates let you quickly answer FAQs or store snippets for re-use.

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink .

Hide child comments as well

For further actions, you may consider blocking this person and/or reporting abuse

manikandan2347 profile image

Integrating BizMagnets WhatsApp Business API for your WhatsApp business.

Mani - Feb 16

camwhitmore0033 profile image

Azure SQL Database Management: Effective Backup and Restore Practices

Cam Whitmore - Feb 16

sagarkapase profile image

Print the all prime numbers in given range

Sagar Kapase - Feb 16

prakashlabels29 profile image

Benefits Of Working With A Label Manufacturing Company

prakash labels - Feb 16

Once suspended, dgloriaweb will not be able to comment or publish posts until their suspension is removed.

Once unsuspended, dgloriaweb will be able to comment and publish posts again.

Once unpublished, all posts by dgloriaweb will become hidden and only accessible to themselves.

If dgloriaweb is not suspended, they can still re-publish their posts from their dashboard.

Once unpublished, this post will become invisible to the public and only accessible to dgloriaweb.

They can still re-publish the post if they are not suspended.

Thanks for keeping DEV Community safe. Here is what you can do to flag dgloriaweb:

dgloriaweb consistently posts content that violates DEV Community's code of conduct because it is harassing, offensive or spammy.

Unflagging dgloriaweb will restore default visibility to their posts.

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

smarty assign var concat

The Ritz-Carlton, Moscow offers comfortable accommodation in 334 guestrooms and suites of different categories. Every guestroom is equipped with Frette linens and the Ritz-Carlton signature featherbeds, electronic fingertip panels for controlling lighting and curtains, fully stocked honor bar, CD/DVD player, high-speed Internet access, computer and fax hook-up and data-port, multi-line telephones with voicemail and cordless telephones and safe with power outlet for laptops. The marble bathrooms feature lighted makeup mirror, hair dryer, scale, plush terry robes and Bulgari bath essentials.

Restaurants

  • Classifieds
  • Manage Your Account
  • Saved items

Lapwai, ID (83501)

Overcast. A few flurries or snow showers possible. Low 31F. Winds light and variable..

Overcast. A few flurries or snow showers possible. Low 31F. Winds light and variable.

Updated: February 15, 2024 @ 10:21 pm

  • Full Forecast
  • Copy article link

Evan Holmes

Joe Campbell

Bryce Blankenship

Sandra Kelly

Nathan Tupper

Six competing for three Moscow City Council spots

Two incumbents going against four aspiring newcomers on nov. 7.

  • By Anthony Kuipers, Daily News staff writer
  • Oct 31, 2023
  • Oct 31, 2023 Updated Oct 31, 2023

Three Moscow City Council seats are open for election this fall and six candidates are asking for the public’s vote.

Sandra Kelly and Drew Davis are the incumbents hoping to continue representing Moscow residents. They are competing against Bryce Blankenship, Joe Campbell, Evan Holmes and Nathan Tupper. Residents will be asked to vote for three candidates at the polls Nov. 7.

The Lewiston Tribune and Moscow-Pullman Daily News sent all of them a questionnaire to let them share details about themselves and their perspectives on the future of Moscow. All but Tupper replied.

Why did you decide to run for office?

Moscow is a community where people can thrive and feel connected to others and the land of the Palouse in meaningful and intentional ways. And it is for these continued connections, both past and present, that I hope to represent our community on the City Council. I’ve wanted to continue to invest in this town that has given me so much, and I am excited to give back by offering my unique perspective and skillset on Council.

What unique qualities would you bring to the table as a city councilor?

My skillset as a philosopher and educator make me well-positioned to be an effective and encompassing City Councilor. I pride myself on being an intentional listener and learner — being patient and effective when it comes to decision-making and communicating those decisions effectively. As a senior instructor at the University of Idaho, I believe I am in a unique position to act as a conduit between students, faculty and the city. I will intentionally help grow the relationship between the University of Idaho and the city and be an active voice in various pockets throughout the community.

What are the most pressing issues Moscow needs to address?

The city must think about how to manage growth and development in sustainable, effective, and thoughtful ways. This means paying close attention to decisions surrounding fair and affordable housing, access to water, and various infrastructure issues. I will prioritize solution-based water management from insights and guidance from organizations like the Palouse Basin Aquifer Committee. I will focus on data-driven metrics to help inform how to plan sustainably for the future. Additionally, I hope to be passionate about preserving and fostering the depth of our community connections —celebrating our unique intergenerational collective that makes Moscow so special.

If elected, what do you hope to accomplish by the end of your first term?

First, I will always advocate for the city — I will be an effective and thoughtful voice as we are mindful of the present but look to the future. I will strengthen the partnership and relationship between the city and the university. I will support small businesses throughout the community and be active and intentional in the decision-making processes of issues listed in the question above. Lastly, I aim to bring people together and celebrate diverse viewpoints and perspectives in all corners of our town — all of which will contribute to moving Moscow forward.

I’ve always had an interest in politics and community service. Growing up, my family spent much of the time below the poverty level. Toward the end of my teaching career I developed an interest in political theory, viewing the concept of liberty in broad and varied ways.

Our life choices are a function of our abilities and our opportunities, but not all opportunities are equal. I want to help create opportunities in education, housing, transportation and health care. Equality of opportunity helps citizens become self-sufficient, and self-sufficiency makes for a better democracy.

I’ve had a successful, fortunate, and diverse life. Growing up in a single-parent household, with a wheelchair-bound sister, I went to high school in a town that was 40% Jewish, and graduated from a college that was 40% Black. While earning degrees, I waited tables, made deliveries and washed dishes. I eventually earned teaching awards, and I’m editing my 10th book.

I appreciate complex problems and diverse points of view. My experience organizing forums will be put to use. I can help Moscow have the important conversations we need to have to have the future we want to have.

According to the Climate Action Plan, we need to reduce emissions by over 50% by 2035, obtaining net-zero emissions by 2050. Transportation is the third-largest sector in the plan. To reduce emissions, we need increased options in public transportation and active transportation such as walking and cycling. Public transportation is a Catch-22 since as transportation options increase usage will grow but we need usage to grow in order for transportation options to increase. To begin, we need to familiarize people with existing public transit options and seek input about which options they would use if given the choice.

Our progress on transportation in four years will be a gauge for progress toward net-zero emissions. One goal of the CAP is to encourage employers to develop alternative transportation incentives. For our efforts to be sustainable we need to work with businesses and developers. Business and homes need to be close for walkability and rideability to be options. Working together as a community, there are multiple ways to incentivize transportation options. I retired last spring as a professor after teaching 26 years at WSU. I have a unique ability to use my experience in academia for the benefit of our community.

In December 2022 I was appointed by Mayor (Art) Bettge to the City Council because of my professional background on planning and zoning, infrastructure, water planning and architecture. I decided to run again because I believe my perspective paired with my professional background is still needed on the Council.

I work in the western United States in several different cities where I get to see firsthand how they operate, and I’d like to be able to take the lessons learned and apply them back to our city here in Moscow.

Currently I’m the only one on the Council and candidate running who has a young family. The perspective of a young family is needed in our city when making decisions. We have incredible amenities and services for our residents such as recreation facilities and the parks, pathways, and rec programs. I always want to represent the young family perspective on issues and decision making. Moscow is a great place to raise a family, I want to ensure for years to come.

Frequently important matters are brought before the City Council that aren’t in the city council’s jurisdiction. I would like to have meetings and information sessions that are recorded and written information that helps instruct citizens what City Council does have jurisdiction over.

Refresher class of local, county and state government responsibilities. I could see this being an hour’s class twice a year where citizens could attend and be informed of the best path to resolve problems issues they see. I think this would be best if the class was taught by members of council, county and state elected official. Citizens could interact more effectively with the elected officials.

If elected, what do you hope to accomplish by the end of your first full term?

I want to start a housing submit for the Palouse like the water summit. This would educate the public and bring different stakeholders such as financial institutions, universities, the city’s contractors, engineers, architects together to proposed solutions for our city. This would allow us to find alternatives for our city and region

Gratitude motivates me to run for office. For more than 30 years I’ve observed and participated in the machinery that runs Moscow. I’m winding down my contracting business, and now have time to use my accumulated knowledge and skills as part of a team of people who share my desire to make this the best place possible. I know the reward of public service from many years working for the National Park Service. In Moscow, Nancy and I learned the real value of community as we raised kids, operated businesses, volunteered where needed, and embraced its pace and quality of life.

— My business management experience, especially an understanding of contracts, budgets, deliverables, and timelines.

— My participation, over the past 30 years, in local public hearings (e.g., annual city budget), workshops (e.g., Moscow’s Comprehensive Plan), community organizations (e.g., Moscow Food Co-op), government boards (e.g., Zoning Board of Adjustment) and attendance at more than 200 city council meetings.

— My wife Nancy’s perspective, as a UI alum with expertise in public surveys and program evaluation; founder/owner of Beginning With Music; past member of ACMS and other boards; current member of Moscow Interfaith Association; and recent retiree from UI’s Office of Research and Economic Development.

— The short-term ripple effects stemming from a diminishing pool of affordable housing for rent or purchase: workforce pressures, food insecurity, transportation shortcomings, childcare deficits and deferred health maintenance are some effects that immediately come to mind.

— Measurable steps toward a permanent solution to our water supply issue.

— The 2025 budget will be a challenge. Taxes, fees, programs, revenues, needs, planning, etc., will require close examination, evaluation, and prioritization.

— “We,” not I, will have a road map for resolving the water dilemma, including a funding budget and timeline. Long-term development, property values, business planning, revenue structure, etc. are compromised by this uncertainty.

— “We,” not I, will have identified land and initiated a process for zoning, platting and preliminary design for residential development that allows smaller lot sizes for single-story starter homes and/or manufactured home installations.

— “We,” not I, will have forged stronger two-way dialogues with taxpayers, businesses, and overlooked/underserved populations, using creative social media approaches; a bolstered public input process at government hearings/meetings; and greater outreach to community organizations and neighborhood associations.

Four years ago, I decided to run for City Council because I wanted to take a bigger step into community service. At that time (2019), I had been with Palouse-Clearwater Environmental Institute (PCEI) for four years, had immersed myself into the nonprofit world, and wanted more. At the time I was a member of the City of Moscow Historic Preservation Commission, the City Human Rights Commission, President of the board for the 1912 Center, Heart of the Arts, an active leader in the League of Women Voters, on the board of the Humane Society of the Palouse, the film committee chairperson for the Kenworthy, a docent and volunteer with the Latah County Historical Society, and on the leadership team for the Alternative Giving Market of the Palouse (AGMP). I may be leaving things out, but you can see, it’s a lengthy list. I was also active on the Moscow Nonprofit Roundtable group, which all allowed me to be very active within the Moscow community. The next natural step, at least to me, was the run for City Council.

I was fortunate to be elected, and my reasons for wanting to continue to serve are much the same.

I am still very active in the community. I left PCEI and went to work at Washington State University for the Center for Civic Engagement where I was the community programs coordinator and I helped create the Cougar Food Pantry. I worked there for two years, and when a similar position at the University of Idaho emerged, I jumped at the chance to work for the best land-grant university in the world. I am now the coordinator for the volunteer and civic action programs at the University of Idaho and I run the Vandal Food Pantry.

I continue to serve in many capacities in Moscow. In addition to being a liaison for several city commissions, I am on the Palouse Basin Aquifer Committee, on the board of directors for Inland Oasis, on the board for the Latah County Human Rights Task Force (though due to some scheduling conflicts, I may have to take on a nonvoting status there), I continue to serve on the AGMP leadership team, I am still a member of the League of Women Voters, and I am on the board of directors for the Latah County Historical Society. I served as President of the Council and as chairperson of the Public Works and Finance committee.

I have the capacity, knowledge and desire to serve, and that is why I want to continue serving as a city councilor.

As mentioned before, I have served in various leadership and board positions, and I have a 20+ year career as a journalist. These experiences have allowed me to not only hone my listening skills, but I know how to work with, and listen to, and help a variety of people. I am not afraid of hard work and long hours, and my only goal is to help our community members and to help our beautiful, eclectic city grow and prosper.

We certainly are struggling with affordable housing. This is not a unique problem in our state, or even in our country, but it is a real and growing problem.

Water is an issue, and while PBAC is celebrating its 20th year as an organization and has worked diligently to come up with long-term solutions to our shrinking aquifer, we must continue to seek alternatives to water conservation, and for that matter, to climate issues other than water. I think there are workable water plans that we can build on, but we must continue to focus on water and be able to move forward, but also pivot, if need be.

In terms of climate change, the city has been working with a focus for years on building a workable and robust climate action plan, and we are committed to battling climate change. I am proud of the work our climate team has put in and I value their insights and suggestions.

Always at issue is making sure we have the city resources to help our citizens. We have a comprehensive plan that we continue to update and implement, and we must continue to work within our means to make sure we have the structures, equipment and facilities to help our city and our citizens have a safe and healthy place to call home.

If elected, what do you hope to accomplish by the end of your next term?

This is an awkward question. I don’t have an agenda that states, “if elected I will …” and then have a list of things I want to implement and accomplish. The simple answer is I hope that by the end of my next term the city is continuing to maintain its streets, sewers, growth and management within budget, and in such a way people are happy and thriving in our town. I will work tirelessly to make this happen.

Naturally, to do this we must make sure the city is living within its means. We must make sure our growth is reasonable yet meeting the demands of people. I hope that in four years we have made a recognizable dent regarding affordable housing, and that people are not as stressed about housing. However, much of that depends on the Idaho Legislature, too. I hope that we are making strides in water conservation and carbon emissions, and I hope our downtown is thriving and diverse.

The Moscow-Pullman Daily News sent all of them a questionnaire to let them share details about themselves and their perspectives on the future of Moscow. Tupper did not reply.

Kuipers can be reached at [email protected] .

  • The Economy
  • Institutions
  • Transportation
  • School Systems
  • Business And Commercial Law
  • Computer Science
  • Construction Industry

Recommended for you

Success! An email has been sent to with a link to confirm list signup.

Error! There was an error processing your request.

Daily Headlines & Breaking News

Event calendar.

Where you go for what you do. The region's best source for events, arts, culture ... everything.

Headlines & breaking news delivered straight to your inbox

Income opportunity

Deliver the Daily News

  • Kenworthy sees pushback on film
  • Man accused of burglary at Hodgins Drug
  • Lewiston flights to Denver shifted
  • Prosecutor objects to Kohberger’s request to move trial
  • All but one school levy approved
  • Man accused of illegally killing, selling mountain lion
  • Prosecutor objects to Kohberger’s request to move trial out of Moscow
  • Kohberger hearing set for Feb. 28
  • UPDATED AT 1:07 P.M.: Stadium Way reopened to traffic
  • Storage unit near Pullman catches fire

Search archives for the Daily News and Lewiston Tribune here.

Sorry , an error occurred.

Account processing issue - the email address may already exist

Sign up with

You're all set!

Thank you .

Your account has been registered, and you are now logged in.

Check your email for details.

Invalid password or account does not exist

Sign in with

Reset Password

Submitting this form below will send a message to your email with a link to change your password.

Forgot Password

An email message containing instructions on how to reset your password has been sent to the email address listed on your account.

Email me a log in link

Promotional offers.

No promotional rates found.

Purchase Gift Purchase Access

Secure & Encrypted

Secure transaction. Secure transaction. Cancel anytime.

Your gift purchase was successful! Your purchase was successful, and you are now logged in.

A receipt was sent to your email.

An error occurred

2018 Primetime Emmy & James Beard Award Winner

R&K Insider

Join our newsletter to get exclusives on where our correspondents travel, what they eat, where they stay. Free to sign up.

In Transit: Notes from the Underground

Featured city guides.

IMAGES

  1. [Solved] Smarty getting substring of a var with strpos as

    smarty assign var concat

  2. 🎉 Smarty assign variable. Smarty assign variables. 2019-02-01

    smarty assign var concat

  3. 😀 Smarty assign var. Assign in smarty. 2019-01-27

    smarty assign var concat

  4. How to add elements into an array in JavaScript

    smarty assign var concat

  5. part13 define var dump and concat variable in the php

    smarty assign var concat

  6. Unix & Linux: Concat two vars to call third var

    smarty assign var concat

VIDEO

  1. Combining Cells With CONCAT in Excel #Shorts

  2. Concat Function in Pandas

  3. WEEK 5 CONCAT

  4. JavaScript Array methods concat and flat✅

  5. concat

  6. Concat Two String In C# || #shorts #viral #trending #coding

COMMENTS

  1. Smarty local variable concatenation with string

    3 Answers Sorted by: 93 The way you are doing it is call the "short form" of assign, you just need to use the correct quoting mechanism: {$yes_src="`$const1`yes`$const2`"} Use assign: {assign var="yes_src" val="`$const1`yes`$const2`"} Use cat: {$const1|cat:"yes"} {$const2}

  2. {assign}

    {assign} is used for assigning template variables during the execution of a template . Note Assignment of variables in-template is essentially placing application logic into the presentation that may be better handled in PHP. Use at your own discretion. Note See also the short-form method of assigning template vars. Attributes: Option Flags:

  3. Concatenation in smarty

    47 One of these should work: {assign var="url" value=$WS_PATH|cat:"aircraft_images/"|cat:$images [i].image} Or {assign var="url" value="`$WS_PATH`aircraft_images/`$images [i].image`"} I am not sure if the $images [i].image will be parsed correctly, you may have to {assign} it to another variable first Share Improve this answer Follow

  4. Assigning variables

    Using $smarty->assign () is the most common way of assigning data to templates, but there are several other methods. Appending data to an existing variable Using append (), you can add data to an existing variable, usually an array. If you append to a string value, it is converted to an array value and then appended to.

  5. assign()

    Description void assign(mixed var); void assign(string varname, mixed var, bool nocache); You can explicitly pass name/value pairs, or associative arrays containing the name/value pairs. If you pass the optional third nocache parameter of TRUE, the variable is assigned as nocache variable. See Cacheability of Variables for details. Note

  6. {assign}

    Attribute Name Required Description; var: The name of the variable being assigned: value: The value being assigned: scope (optional) The scope of the assigned variable: \'parent\',\'root\' or \'global\'

  7. Variables

    Variables Template variables start with the $dollar sign. They can contain numbers, letters and underscores, much like a PHP variable . You can reference arrays by index numerically or non-numerically. Also reference object properties and methods.

  8. Concatenate strings and variables in assignment of new variant in smarty

    IODIN will to concatenate an already assigned variable and save it to a new variable, something like this: {assign var=permCat value="de.admin"} {assign var=objectName value="myClass"} {assign var= Stack Overflow. ... Concatenate strings and variables in assignment of new variable in smarty.

  9. Smarty: Concatenation of variables inside block parameters · Harecoded

    Smarty: Concatenation of character indoor block parameters Tue, Sep 4, 2012. Include Smarty sometimes she need to concatenate 2 variables and pass it as a single variable inside a block. But the space won't allow any expected PHP syntax Variable modifiers cannot subsist applied up var, custom functions or strings. ...

  10. Smarty: Concatenation of variables inside block parameters

    Tue, Sep 4, 2012 In Smarty sometimes you need to concatenate 2 variables and pass it as a single variable inside a block. But the placeholder won't allow any expected PHP syntax You want to accomplish something like: {assign var="MYVAR" value=$variable1.$variable2} But, the dot in smarty is for array access, so, what about...

  11. Php Smarty template

    1, Assign a simple text with variables: {assign "myVar2" "myVar1 content=$myVar1"} explanation: Smarty's smart enough to replace value of variable within quotes. 2, Assign special characters or longer text: {capture assign="myVar3"}mytext {$myVar1}_ {$myVar2} {/capture}

  12. Smarty :: View topic

    www.smarty.net • phpinsider.com • Forum Index • FAQ • Search • Memberlist • Profile • Log in to check your private messages • Register • Log in Concatenate values for use in an assign variable

  13. Moscow Hotels. The Ritz-Carlton, Moscow

    The Ritz-Carlton, Moscow offers comfortable accommodation in 334 guestrooms and suites of different categories. Every guestroom is equipped with Frette linens and the Ritz-Carlton signature featherbeds, electronic fingertip panels for controlling lighting and curtains, fully stocked honor bar, CD/DVD player, high-speed Internet access, computer and fax hook-up and data-port, multi-line ...

  14. Differences subtle in Moscow candidate forum

    The six candidates for this fall's Moscow City Council election shared largely similar views on the issues of housing, growth and water use during a Wednesday candidate forum.

  15. Six competing for three Moscow City Council spots

    Oct 31, 2023 Updated Oct 31, 2023. Three Moscow City Council seats are open for election this fall and six candidates are asking for the public's vote. Sandra Kelly and Drew Davis are the ...

  16. Smarty :: View topic

    Posts: 10 Posted: Mon Dec 26, 2016 10:38 pm Post subject: How to concatenate variables? Text? text and variables? I have a couple variables that I am trying to concatenate with text, to create a date string. I cannot find an example showing if this is possible. Trying to create a date string: YYYY-MM-DD I have the YYYY, MM, DD.

  17. Burrata is the most popular dish in Moscow this summer

    So why burrata? My theory is simple: in Moscow, it's all about the cream. It's not just the sushi rolls with cream cheese. It's also the mayonnaise and cream cheese salads for New Years, the endless creamy desserts served from Red Square to the suburbs—tiramisu, cheesecake, creme brulee and panna cotta.

  18. Concatenate smarty variable with foreach

    1 Answer Sorted by: 4 You can do it this way: {assign var=result value=''} {foreach from=$attachments item=attachment} {assign var=temp value=$attachment.file} {assign var=result value=$result$temp|} {/foreach} Share Improve this answer Follow answered Nov 24, 2011 at 11:49 Eugene 3,290 22 17 It's thing I need. Thank you very much!

  19. Smarty :: View topic

    www.smarty.net • phpinsider.com • Forum Index • FAQ • Search • Memberlist • Profile • Log in to check your private messages • Register • Log in Concat Var and string Smarty Forum Index -> General