HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Setting Height and Name of Standard Blocks

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#105088 (In Topic #20492)
Avatar

Honoured member

Hello all,

Does anyone have any tips on how to set the Display Name for a standard block?

In particular, the Weather Block, which defaults to "Weather report". I am using this code (had to upload as an image to get it to display), and the title is not working:



Also, looking to set a fixed height of 340 Pixels on the box itself, any suggestions on how to code that?

Thanks for any advice!

Rick



Last edit: by Florida_Owl
Back to the top
 
Posted
Rating:
#105101
Avatar

Community saint

For the title of the block, it's actually a language string defined in one of the .ini files. If you have the search box enabled in the upper right corner of your adminzone, do a search for weather_report and that should locate the correct language file to make the change to.

For the height, you will probably need to edit the BLOCK_SIDE_WEATHER.tpl template and wrap the entire contents of the template in a <div> or <table> HTML tag. Something like <div style="height: 340px;"> as the first line of the template and </div> as the last line of template. 
Back to the top
 
Posted
Rating:
#105111
Avatar

Honoured member

Thanks Jason!

I thought perhaps the size specification wrap could be done around the "semihtml" coding while editing the page itself…but guess not?
Back to the top
 
Posted
Rating:
#105116
Avatar

Community saint

Actually, now that I looked more closely at the template code for the block, I think what you would need to do is include a style="height: 340px;" in either the <section> or the <div> HTML tags that are on the first line of the original template. That should expand the box (the outline of the box) to be 340 pixels tall. And if the content of the box needs more than 340 pixels, some of the content may get cut off (but I'm not 100% certain of that). If you did it the way I originally suggested by adding a new <div> tag around the code in the template, or doing it your way by adding the <div> tag around the [block] definition in the comcode page or panel, the box (the outline of the box) will still be sized according to the content within the box but the overall area used by the block should be 340 pixels tall. That would let you keep blocks in neatly defined rows, but the boxes in those rows will be sized according to the content within the box and not the size of the row.
Back to the top
 
Posted
Rating:
#105117
Avatar

Honoured member

Thanks Jason, will give that a try!
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: