Download  |  Search  |  Log in  |  FAQ  |  Memberlist  |  Online  |  TYPO3.org Developer Resource
Home » TypoScript » Templates
Post new topic   Reply to topic Page 1 of 1 [3 Posts] Hiding content when empty
Author Message
spica



Joined: 28 Sep 2006
Posts: 3

PostPosted: 28 Sep 2006 - 8:59 pm    Post subject:  Hiding content when empty
Subject description: If there is no data on the rigth dont show the block
Reply with quote

Hi, I've try 2 days to do this with no success....

I've a template with a rigth div, so when there is no rigth content it display and empty border.
I want to hide the border when there is no content.

I am new at these and cant find any on the web.

this is the html in the template
Line:  Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14

<!-- ###SIDE_BAR### Start -->
      <div id="sidebar">

         <div class="featurebox">
         <!-- ###INHALT_RECHTS### Start -->
         <h2>INHALT RECHTS</h2>
         <!-- ###INHALT_RECHTS### Start -->
         </div>
            
      </div>
<!-- ###SIDE_BAR### Start -->
 Show complete code


this is the setup code

Line:  Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
page.1 = TEMPLATE
#page.1.marks.PAGE_UID = TEXT
#page.1.marks.PAGE_UID.field = uid
page.1 {
   template = FILE
   template.file = fileadmin/templates/wr/index.html
   workOnSubpart = DOKUMENT
   subparts.INHALT < styles.content.get
   subparts.MENU_OBEN < temp.MenuOben
   subparts.MENU_LINKS < temp.MenuLinks
   #subparts.MENU_UNTEN < styles.content.get
   subparts.BREADCRUMP < tmp.breadcrump
   subparts.LINKS < styles.content.getLeft
   #subparts.LINKS.select.pidInList = 2

#this is the line I want to become optional
# if "styles.content.getRight" is empty do not print the SIDE_BAR div
subparts.INHALT_RECHTS < styles.content.getRight


   subparts.SITENAME = TEXT
   subparts.SITENAME < temp.seitenTitel
   subparts.SUCHE < temp.suche
   #subparts.CONTENT_BORDER < styles.content.getBorder
   #subparts.COUNTER = TEXT
   #subparts.COUNTER < plugin.tx_cscounter_pi1
   #subparts.LAST_UPDATE < styles.content.lastUpdate
}
 Show complete code

PLEASE any ideas?
Back to top
View user's profile Send private message
DanyV



Joined: 13 Jun 2007
Posts: 1

PostPosted: 13 Jun 2007 - 9:42 am    Post subject: Reply with quote

I have the exact same problem !

I need to hide certain content if the right column is empty.


Found somewhere on the internet that this would be simple:

Line:  Code:
1
2
3
4
5
6
7
[styles.content.getRight = '']
(typo code if empty)
[else]
(typo code if not empty)
[global]
 Show complete code


But this doesn't seem to work at all.

Anybody has any ideas ?

Thanks a lot!

Dany
Back to top
View user's profile Send private message
mediatech



Joined: 21 Nov 2006
Posts: 17
Location: Del Mar, California

PostPosted: 14 Jun 2007 - 7:56 pm    Post subject: Reply with quote

This would be a nice option. I did a little searching and found some threads like this.

http://support.typo3.org:8080/jive/thread.jspa?messageID=218004

Appears we may need to use the stdWrap.ifEmpty option. I don't have time this week to test but I am definitely interested in a solution myself. This are my search keywords.
_________________
TYPO3 Support and XHTML Templates
http://www.mediatech.net
Skype: gremington
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [3 Posts] View previous topic :: View next topic
Home » TypoScript » Templates
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum