We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10405
    • 288 Posts
    I don’t know how that would work- the page where the Ditto code will call from already has its own template set up, and the bit where it’s pulling the truncated content fo the news article from is already fully formatted- in fact it has a smaller title text and a smaller version of the image in place so it looks quite different to the original article in terms of formatting- so I can’t really go ahead and create a new template for it to try and ensure the picture from a news article isn’t included. Is there not an easier method than this? (Perhaps a paramater to ignore image content?)
      • 15082
      • 195 Posts
      If the page with the ditto call has it’s own template, you can include a css rule that makes the image invisible (display: none).

      Greetz
      JUSI
        • 10405
        • 288 Posts
        There are a number of different images that will need to be "blocked" in this way, how would this be done in the CSS? Presumably this template (for the front news page) would then have to reference a slightly different stylesheet which includes the CSS for blocking the images?

        Also with regards the ditto template chunk:

        <div class="dittoExpanded">
        <div class="bodytext">[+summary+]</div>
        [+link+]
        </div>

        Really I want to be able to format the h1, h2 and p text from the original article so that (for example) the h1 and h2 text is smaller, maybe different colour. As there seems to be just one placeholder [+summary+] for the whole content, is there a way that individual parts (e.g title, preliminary text, paragraphs etc.) can be formatted inside the template so that they fit with the formatting on the front news page where they will be presented?
          • 15082
          • 195 Posts
          When you decide to include a special css for the ditto call page you can also format the headline etc. in a different way.
          For the images, the best would be a class assigned to each image that should be hidden, if possible.
          Than you can hide them easily by css (ex. .hiddenImage {display: none}).

          Greetz
          JUSI
            • 10405
            • 288 Posts
            The problem is that the whole content gets called with the [+summary+] placeholder so there’s no way in the template of distinguishing between the <h1>, <h2>, <p> etc. of the content being pulled- so I don’t see any way that CSS could affect or change the formatting / layout- it’s all self-contained inside [+summary+].

            Also where do the classes in the ditto template chunk come from? I can’t see a stylesheet that gets referenced anywhere...

              • 26931
              • 2,314 Posts
              The problem is that the whole content gets called with the [+summary+] placeholder so there’s no way in the template of distinguishing between the <h1>, <h2>, <p> etc. of the content being pulled- so I don’t see any way that CSS could affect or change the formatting
              if this is your Ditto-template:
              <div class="dittoExpanded">
              <div class="bodytext">[+summary+]</div>
              [+link+]
              </div>

              style your h1 accordingly:
              div.bodytext h1 {font-weight: bold;}
              like this you targeted your h1 just inside of this template
                • 10405
                • 288 Posts
                Well, I;’ve tried adding this in the head of the template that the page uses:

                <style type="text/css" media="screen">
                div.bodytext h1 {font-weight: bold; font-size:16px;}
                div.bodytext h2 {font-weight: bold; font-size:14px;}

                </style>

                But it just ignores it, presumably it isn’t seeing the "bodytext" div that’s being referenced in the Ditto template chunk.

                In fact I can’t see which stylesheet "bodytext" is in (it’s not in the custom one for the site), presumably it’s set in a Ditto stylesheet but I haven’t been able to find it.

                Just in case it’s trying to look in my custom stylesheet, I created a new "dittotext" class, and added this in the CSS: (and amended bodytext to dittotext in the ditto template chunk)

                .dittotext h1 {
                font-size:18px;
                font-weight:bold;
                }

                But that doesn’t work either.

                  • 26931
                  • 2,314 Posts
                  try adding !important in your css:
                  div.bodytext h1 {font-weight: bold !important; font-size:16px !important;}
                  div.bodytext h2 {font-weight: bold !important; font-size:14px !important;}

                  ...maybe your css needs to be more specific (check with firebug)
                  is the site online?
                    • 10405
                    • 288 Posts
                    That seems to work pretty well, thanks.

                    It’s just a matter now of trying to get the image to align in top right- a bit of a problem as the image comes after the title in the content stream.