We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6228
    • 249 Posts
    Sorry, I can’t get it out of my head...

    are you actually nesting html tags within the [tt]<title></title>[/tt] tag?

    EDIT:
    brain fart. The title tag doesn’t appear in page content. Time to grab my morning coffee.
      lo9on.com

      MODx Evolution/Revolution | Remote Desktop Training | Development
      • 12241
      • 80 Posts
      If the rule is to have the first word coloured, then why not leave it to the system to handle it?
      Of course, let the system handle the first word, if that’s the rule. In my case I’m trying to setup headings that have multiple words throughout the heading that are styled (like those cool magazine covers), so that is my rule smiley hence the ability to add the extra markup to designate where spans are created. But yeah, I like the idea of the system doing everything, in this case we need that extra flexibility.

      And yes, the span should not have inline styles applied, class is much better or even no class ie just target the span like so:
      /*css*/
      h2 span.fancy {color:red;}
      
      ...or...
      h2 span {color:red;}
      


      @cyclissmo, in this case, we are adding span elements to the [[*pagetitle]] placeholder content ... which, from the first post, is located between <h2> tags, so the ’spans’ are nested in the headings. This solved the issue of the getResources snippet not parsing the <span> tags when placed directly in the pagetitle resource field.




        Environment:
        modx: rev 2.0.8-pl
        localhost: Apache/2.0.63 (Unix) PHP/5.2.11 DAV/2, MySQL client version: 5.1.37