Announcement

Collapse
No announcement yet.

Persistent "Teaser" Fragment

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Persistent "Teaser" Fragment

    My customer wants a "teaser" area in his site layout which appears on every page. He will use it to highlight news items etc.

    The teaser will consist of an image, title and around 15 words of text.

    I would like him to be able to control the teaser's content from within the content tree. Is there any way to set up a fragment which I can then reference from the relevent Act_Primary*.html files and have appear on every page in the whole site?...

    Thanks in anticipation,

    click-through

    #2
    I would either use a single CUSTOMVAR:MYFILENAME to reference a text file containing the html code, which would reside within the site1 folder, and assign it within the Design | Options as Filename and Use Content to pull the content into each page at upload / generation time.... but would rely on your customer knowing html I guess for this.... so.........

    Add something along the lines of within the desired position of the Primary templates...

    CUSTOMVAR:MYTITLE
    <img src="CUSTOMVAR:MYIMAGEFILENAME" border="0">
    CUSTOMVAR:MYTEXT

    within which ever table format you want to format it all of course...

    Then, ensure you add the custom properties within Advanced | Custom properties, and within Design | Options | Defaults, then assign the image filename (ensuring you save it to site1) and ensure it is set to Filename, and then assign values for the title and the test.

    This method, will then allow you to assign it at the top level and also change it as you see fit at the section level also.

    Note: Image has not height or width settings, so you can either leave as is, if the potential for different image sizes is likely, or set it with more customvars to allow the easy option of changing, or fixed by assigning the widths and height in the template code...

    Comment


      #3
      An ALT tag would not go amiss for people using screen readers and to help out with SEO and validation work


      Bikster
      SellerDeck Designs and Responsive Themes

      Comment


        #4
        Thanks, Guys

        TechnoWeb and Jont...

        Thanks for the ideas - tried the custom vars thing today and it works a dream. Good point on the alt tag Jont - got one of those in there as well.

        All the best!

        click-through.

        Comment

        Working...
        X