Jump to content

PW 3.0.66 & “Functional Fields” module released


ryan
 Share

Recommended Posts

Functional fields sound awesome!

Seeing as both of these may be used as the first argument...

__text('Subscribe') // intended to be some default text
__text('subscribe') // intended to be the name previously given to some different text 

...is it right that you would have to be careful when giving a name to text to make sure it is not a string that might be used as default text, now or in the future? Like, maybe you would want to prefix the name with something that is unlikely to be used as default text. And in the example above, would those two be identified as separate text items - i.e. is the name case-sensitive?

  • Like 3
Link to comment
Share on other sites

Quote

Seeing as both of these may be used as the first argument...

I don't think it'll be an issue for this case because the words may be the same, but the case is different. But there's actually another function in the posted version called __value('name'), which is what you can use if you prefer it. It returns whatever bit of text has the given name, regardless of what kind it is. However, it's pretty easy to avoid these kinds of collisions even without the __value() function. 

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...