how to get value of a static placeholder in view.py - placeholder

How to get current value of a static placeholder in view.py.
In template I put invisible static placeholder "email"
I need is to be able to change it in the admin
in view.py need to send an email to this email address

Yes i'm talking about django. I'm looking for something to store a single config value, that i can change it in admin panel

Related

How to load contact field token in email template based on condition

I want to show the contact first name in the e-mail, but if the first name field is empty I want to show some other field. Is this possible?
Something like this:
Hi {contactfield=firstname} or if empty {contactfield=email}
Thank you in advance.
Yes it is possible, you can use "Dynamic Content" option available in slot type. it allows you to use variations in the content based on value of the the field.
simply add the slot, then put in a default value, click Add Variant and at the bottom right you can choose the field and comparison option.

MVC/Razor Identity 2.0 - Where is error string for account already taken?

When a user is creating a new account and attempts to use a username that already exists, an error message is displayed by #Html.ValidationSummary(true) that says:
Name test#example.com is already taken.
I need to localize that string but cannot find it in the entire solution. Does anyone know where this string is defined?
The Identity 2,.0 is localizable via Nuget Packages:
Instal-Package Microsoft.AspNet.Identity.Core.XX
where XX is the desired culture (es, de, fr...)
There is no other way to do it.
Of course, you need to somewhat set the culture of your application: in web.config, programmatically, specified by the user's browser...

Joomla 3 menu item URL appened

Joomla version 3 menu item has a field called "Note" which is primarily used to display notes in the administrator backend.
I have populated "note" field with something like "&City=4&County=0" Now I want to append this in front of the Link URL. Link URL is none editable field which is automatically populated based on article selected so I cannot edit or type in it manually.
Normal URL based upon selection of the article looks like something this:
index.php?option=com_content&view=article&id=10
Now I want to append the note field in front of this URL so the URL would look like:
index.php?option=com_content&view=article&id=10&City=4&County=0
Here is the screenshot:
(source: linkbank.co.uk)
You could make a new view, just copy components/com_content/views/article to cityarticle or something meaningful, then edit the default.xml you find in its subfolder ./tmpl, change the name so you can identify it and add the fields city and county to the
on line 16 roughly, those will appear when you create a new menu item (on the right) so you can set them, and will be passed on as get requests.
Choose the appropriate field type and read the docs here:
http://docs.joomla.org/Standard_form_field_and_parameter_types

Salesforce Create Buttons and Links option - Custom URL to launch email template

I have an email template that I would like to launch from within the case using a Link/Button. I see the option under setup->customize->cases->button and links I even see where I need to place the URL. What I don't see is nay documentation on how to build the URL to launch an email template. Any help you be great
I don't know if this is documented anywhere by salesforce, but I found from some guess work:
/_ui/core/email/author/EmailAuthor?p3_lkid={!Case.Id}&p2_lkid={!Case.ContactId}&template_id=00X40000000weWn
Just use that as the url content of a custom button or link. This one is for cases, as you are trying to do, but I think this should work for other types of objects as well.
The parameters are p3_lkid, which is the case id, p2_lkid which is the id of the contact you are emailing, and template_id which is hardcoded to the desired email template. (You can find this id by looking in the url of the Setup page for the template)
This was really helpful. I did, however, figure out another way to do it. Click on the "Send an Email" button you currently have. Copy the URL and add &template_id=YOUR TEMPLATE ID.
There is one other ID number that will show up in the original URL. Change that to be the dynamic field you want it to be.
For example:
Copy url from "Send Email": https://na3.salesforce.com/_ui/core/email/author/EmailAuthor?p3_lkid=70150000000Axj1&retURL=%2F70150000000Axj1
Add &template_id=YOUR TEMPLATE ID so it looks like this:
/_ui/core/email/author/EmailAuthor?p3_lkid=70150000000Axj1&retURL=%2F70150000000Axj1&template_id=YOUR TEMPLATE ID
Remove the other id (it's the object you used to send the email - so in this case, I was wanting to be able to send an email directly from a Campaign) and replace with the dynamic field:
/_ui/core/email/author/EmailAuthor?p3_lkid={!Campaign.Id}&retURL=%2F70150000000Axih&template_id=YOUR TEMPLATE ID
And voila! It should work!
Abeyer's answer is good. However, if the template contains solution attachments "{!Case.Solution_Attachments}" the attachments will not get included unless you add the new_template=1 parameter to the URL making it:
/_ui/core/email/author/EmailAuthor?p3_lkid={!Case.Id}&p2_lkid={!Case.ContactId}&template_id=00X40000000weWn&new_template=1

SSRS 2008 change built-in User ID

is there a way to change the value of the built-in parameter: User ID? I don't need the name of the windows authenticated user, but the name that I pass in the url to open the web page containing the report.
i.e. http://servername/ReportList/Pages/Report.aspx?username=somename
I would like that User ID = username, so I can display it in the footer of the page.
Thank you
C.
You can't change the value of the built-in field but you can create a parameter, even calling it UserId or Username. (The built-in field is not really a parameter.)
Then you can assign a value to that parameter using URL Access:
https://msdn.microsoft.com/en-us/library/ms155391.aspx (SQL 2016 link)
For example, to specify two parameters, “ReportMonth” and
“ReportYear”, defined in a report, use the following URL for a native
mode report server:
http://myrshost/ReportServer?/AdventureWorks2008R2/Employee_Sales_Summary_2008R2&ReportMonth=3&ReportYear=2008
For
example, to specify the same two parameters defined in a report, use
the following URL for a SharePoint integrated mode report server. Note
the /_vti_bin:
http://myspsite/subsite/_vti_bin/reportserver?http://myspsite/subsite/AdventureWorks 2008R2/Employee_Sales_Summary_2008R2.rdl&ReportMonth=3&ReportYear=2008
Note that you can't use URL access when running the report through the "Report Manager" interface which gives the title bar and the views to explore reports (usually at /reports/.) ReportServer is a different service that just sends the report itself.

Resources