Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Display Typo3 Content Element only on SSL Page

Posted on 2010-08-18
2
Medium Priority
?
647 Views
Last Modified: 2012-05-10
Hello,

is there a way to only display a Typo3 Content Element if the page is viewed over a SSL encrypted connection?

Kind regards,
Jan
0
Comment
Question by:schlueter
2 Comments
 
LVL 4

Accepted Solution

by:
aoline earned 750 total points
ID: 33492491
Hello

You need to use the Typoscript conditions and check for a server variable like this:

[globalString = _SERVER|HTTPS=on]
   # Your TS goes here...
[end]

The TS inside this condition will only action if the condition is true. In this case the HTTPS connection.

The next part of the problem is to render the content element you need. If you have special content only to display in limited circumstance we normally put this content element somewhere other than in line. Using something like this.

  20 = CONTENT
  20 {
    table = tt_content
    select {
      pidInList = 2
      andWhere = colPos = 1
    }
    renderObj < tt_content
  }
 
So these 2 pointers should be enough for you to construct the TS you need to solve your problem.

Enjoy,
Matthew
0
 
LVL 1

Author Closing Comment

by:schlueter
ID: 33503854
Thank you, it works fine at my test installation!
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We've all had that page pop up telling us there is a problem with the certificate and some of us continue on anyways and others run away to a safer competing site.  But what to do when you get the error - is it your problem or theirs?  What can you …
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question