Search

I have a comments datasource that holds entries; each of them contains an email field.

I want render a structure like

  <recent-comments>
     <entry id="1">
         <email hash="234we89ui98343">email@example.com</email>
     </entry>
  </recent-comments>

the question is how to i add this extra attribute to email element on each entry node.

here's a gist

Ah right it's possible but it's somewhat expensive. You'd have to loop through all the entries, and through all the email fields. - I've modified your gist here - it might need some modifications but should more or less work. Used the approach to parse items and values before.

Quite honestly I would prefer to output the email as output param, and create a new datasource which would take the list of emails, and convert them into the md5 equivalent and output in a separate datasource (through chaining). Then match up the correct url using xslt. But it works anyways.

Wow, that was blowing fast! :D

I read about some default formaters in the future, that will output md5 hashes.

Thank you @gunglien.

No problem, let me know in case that doesn't work for you.

wow, that was blowing fast! :D

Well I just happened to reload the page shortly after you posted it. + Trying to be somewhat more active in the community when I have the time.

Yeap works, chapeaux!

This is the discussion, i've told you about.

ah yeah, I was following it. I'm @jonmifsud on github and pretty much everywhere else (too late to change my username on the Symphony Forums).

Alternative, the Output Field extension will give you an email hash as an attribute. http://symphonyextensions.com/extensions/output_field/

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details