Results 1 to 6 of 6

Thread: The best way to handle duplicate content?

  1. #1
    User
    Join Date
    06-19-09.
    Posts
    417

    Default The best way to handle duplicate content?

    Hi,

    I am converting an existing site in to Typolight.

    Many of the pages have duplicated content, for example "Our opening times are.....".

    In the old world of hard coding and "Dreamweaver" the way I would handle this would be to create a php include file, and include that file on all the pages it was needed.

    The main purpose being that if the opening times ever changed, I only had to update this in one place to populate it throughout the site.

    What we be the best way to achieve something similar in Typolight?

    Thanks,

    Gary.

  2. #2
    User
    Join Date
    07-16-09.
    Posts
    128

    Default Re: The best way to handle duplicate content?

    i think the best way is to do a module with "HTML content"
    then make a layout in which you includes the module, and apply layout to the page you want with the "duplicated content"

  3. #3
    Experienced user
    Join Date
    08-21-09.
    Posts
    563

    Default Re: The best way to handle duplicate content?

    Another alternative -- that I've used -- is to create your content normally inside an article of a page.

    For your other pages where you want to duplicate content from this, you create a new content element of type "Content Element" or "Article" (which is under the heading "Include Elements" at the bottom of the drop down list of element types). From there you choose the CE or Article you wish to include from another page. It basically acts as an alias -- whenever you make changes to the original content, those changes will be reflected on all the duplicates.

    The advantages of this method are you still give the client the full range of features to edit their content (WYSIWYG, CE types, etc) whereas the module method I believe requires you to write raw HTML. The other is that I usually don't give clients access to the modules section, but they still can access the duplicated content to make any changes they need via the articles section.

    Another possibility -- more useful if you have one block of content (like contact information) that is to be included as a sidebar on every page, for instance -- is to take a look at the "Content-Box" extension. Since in this scenario your content doesn't really have a "home" on one particular page, creating it outside the page/article structure may be more intuitive.
    Brian

  4. #4
    Experienced user
    Join Date
    08-21-09.
    Posts
    563

    Default Re: The best way to handle duplicate content?

    I just thought of another method -- haven't actually used it but it may work as well.

    Create a new page in your site structure -- call it "Global Elements" or something like that. Hide that page from all navigation menus/site map/search, etc. The only purpose of this article would be to hold all elements you want to reuse on all your pages.

    Once you create your reusable content on this page, you can do any one of the following --
    - Use the Include Content Element method to put it only on certain pages.
    - Create a module for "Custom HTML" as Desperados described, but place an insert tag to your content instead.
    - Hard code insert tags in your template to include the content


    It's a tad hacky (since you are "misusing" the page structure a bit), but it seems like it would be very easy for a client to grasp.
    Brian

  5. #5
    User
    Join Date
    10-05-09.
    Location
    Dallas, TX, US
    Posts
    70

    Default Re: The best way to handle duplicate content?

    Take a look at the inserttags extension: http://www.typolight.org/extension-list ... 09.en.html

  6. #6
    User
    Join Date
    06-19-09.
    Posts
    417

    Default Re: The best way to handle duplicate content?

    Thanks for all the help here, much appreciated.

    Creating a "Global Elements" page and using the "Include Content Element" seems the most logical way forward for this site.

    Thanks again,

    Gary

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •