Questions tagged [hash]
The hash tag has no usage guidance.
15 questions
1
vote
0
answers
87
views
Remove current fragment anchor hash from url during redirect without js
When calling {% redirect externalUrl %} from source mydomain.com/#anchor to externalUrl = destination.com the #anchor is appended to the externalUrl after the redirect (destination.com/#anchor).
Note ...
0
votes
1
answer
28
views
Redirect url validation failure
I'm stuck on something and need some advice. I have a frontend login form where I need to dynamically change the redirect input value with JS when it changes. The page has instantsearch in place and I ...
1
vote
1
answer
259
views
DOM hash url in entry slug
I try to set the slug of an entry to a url using a hash.
https://url.spec.whatwg.org/#dom-url-hash
However it seems not possible by default, craftcms changes the hash to a dash.
I need that as ...
1
vote
1
answer
108
views
Setting numerical key values in a hash
I now know the answer to this but I’m posting it here as a note to myself and in case it helps people.
Let's say you are looping through some entries and storing values in a hash…
{% set myHash = {} %}...
1
vote
2
answers
266
views
Using a variable for a hash key
I am trying to use a lookup table technique I saw in a recent Craft Link List post, but getting errors.
The general objective is to auto-generate button text from an array of possibilities using a ...
1
vote
1
answer
258
views
Get a hash’s key name
This is possibly more of a Twig thing, but if I have a hash…
{% set hash = {
"key": "value"
} %}
How can I output the key name?
{% for value in hash %}
<span class="{{ key }}">{{ ...
1
vote
1
answer
27
views
Problem with data hash only storing last entry in loop
1: I'm creating a data hash object and then looping through a collection of entries to store the results of various macros in it:
{% set data = {} %}
{% set people = craft.entries().section('people')...
2
votes
1
answer
2k
views
Getting "Invalid verification code." on password reset
I've had a few users on our site have trouble resetting their password. They go through our "Forget password" flow on the front-end of our site, receive the reset email, which allows them to create a ...
1
vote
1
answer
741
views
How does "hash" work in the context of the Contact Form?
I'm running into some trouble using the "hash" filter in Craft's first-party Contact Form plugin. The docs suggest using it like so:
<input type="hidden" name="redirect" value="{{ 'contact/thanks?...
1
vote
2
answers
202
views
Importing members from EE without password reset
We've rewritten an EE site on Craft and now need to import the members.
My understanding is that since passwords are hashed & not encrypted there is no way to transfer the passwords from EE to ...
3
votes
2
answers
1k
views
Encrypt ID on front-end and decrypt on back-end
I have a front-end form that posts through the ID of a particular element/entry to a back-end controller. Is there any way to encrypt/hash that ID on the front-end, so the plain ID number is not ...
4
votes
3
answers
1k
views
How can I import existing users with passwords stored in a different format than Craft's hash format?
Se need to import a large user table to a Craft installation. Unfortunately, the passwords in the imported data are SHA1 encrypted (and salted).
What is the best way to enable the login of the users?
...
3
votes
2
answers
7k
views
Craft or Twig filter for MD5 or SHA3 hash creation?
I've been digging around and haven't found an existing Twig filter for what I'm trying to do. Basically, I'd like a filter that would provide a hash of a phrase.
Pseudo-template code would be ...
2
votes
1
answer
3k
views
How can I convert a dropdown field value to an integer within a hash?
I'm setting up a twitter feed with craft.twitter.get() and I need to convert a dropdown value to an integer. Here is my code far:
{% set cacheTime = sidebarBlock.twitterFeedCacheTime %}
{% set tweets ...
7
votes
1
answer
783
views
How can I use operators within Twig hashes?
I'm looking for documentation on how to use operators in hashes in Twig. Someone mentioned this in the Google+ support group the other day and I was unable to find any docs or examples.
{% set ...