Jump to content

Html fields, tokens, per-page assets questions


ferahl
 Share

Recommended Posts

Firstly I am loving the CMS, so glad that I found it. I have worked with and tinkered with many and literally non have excited me except this one.

I only started playing yesterday and I have a few questions I'd appreciate some advice on:

tokens/sanitization/html fields

For some of my fields I would like to be able to use tokens for example "It's in the [highlight]Game[/highlight]". Failing this I would like to create simple single line fields which accept some html tags like span/em/strong. Also in the stock installation I don't see a field that allows html - just a "Text" field.

Thanks!

  • Like 1
Link to comment
Share on other sites

Hi Ferahl and welcome to the forums.

You can put html into text or textarea fields. When using textarea, you can also choose TinyMCE editor and then customize it (per field basis) to contain only the needed controls. There ain't (or at least I don't know) any ready parser module for bb-tags, if that is what you are looking for?

  • Like 1
Link to comment
Share on other sites

Hi Ferahl and welcome to the forums.

You can put html into text or textarea fields. When using textarea, you can also choose TinyMCE editor and then customize it (per field basis) to contain only the needed controls. There ain't (or at least I don't know) any ready parser module for bb-tags, if that is what you are looking for?

Aha thanks, I was confused because I was using the built in "headline" field not realising that this was being sanitized but a normal text field is not being. Tried a normal text field and it works just fine.

Link to comment
Share on other sites

Usually sanitizing is done through textformatters: edit field => details tab => textformatters. I think there is HTML entity encoder on headline field, you can remove it if you want to.

Other way is to sanitize when outputting and third way would be using some kind of autoload module (but I think there is little reason for that because of textformatters).

  • Like 1
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

×
×
  • Create New...