resizable items and pages

I have a couple of pages where there’s PHP code which pulls rows from a database. No matter what I’ve tried, the markup area always grows to the complete depth of the returned results but I’d like to restrict it to a fixed size. I already limit the rows returned but as each row varies in size it’s not reliable. The data even extends way beyond the page depth which seemed odd to me.

I want to add a footer to a master page and the db listing is just trampling over any attempt at a footer. So my questions are:

  1. is there a way to forcibly restrict the size of a markup item?

  2. what’s the best way to add a standard footer to a (master) page - preferably which will move up or down with different page content? Something like the blue footer on this page - http://www.theleader.com.au/

  3. once I have set an item to be dynamic height (setting height to nil), is there a way to set it back to nominated height again?

I’ve come a long way in a couple of weeks but I clearly still have much to learn.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Working with dynamic data and layers can be a pain, using a box model can help you get around these issues but I personally do not use layers for dynamic data ‘or rather rarely use’, I really find it a lot of work and I also find it can be restricting. I see no real disadvantage not using layers and the advantage is the page always comes out as I want it to be without having to worry about overlaps, wide areas of white space etc. Others view on this may differ but this approach works for me, for what I do and for what I need.

I am not sure how you are outputting the data in the markup item but you can limit the number of chars for data, I do this myself at times although I have a function I pass the data through which cuts the string to a certain length and then adds 3 full stops after the text. This might not suit your needs but there are many ways of doing this like adding a [ Read more ] after the text like: ‘and some te… [ Read more ]’ while linking the ‘Read more’ to the full text.

A small example of restricting the string length in a variable could be done as follows:

<?php
// Text content set to variable
$theStr = 'Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla,';
// Shorten the string to 35 chars and add '...' to the end of it.
$theStrShortened = substr($theStr,0,35) . '...';
?>

Obviously you would need to deal with the string being cut off and give your visitor a way of reading the full information as mentioned above but then I am not sure what you are doing and if this is even the problem you are having without seeing an example.

HTH

On Apr 18, 2012, at 11:55 AM, Kim Kohen wrote:

I have a couple of pages where there’s PHP code which pulls rows from a database. No matter what I’ve tried, the markup area always grows to the complete depth of the returned results but I’d like to restrict it to a fixed size. I already limit the rows returned but as each row varies in size it’s not reliable. The data even extends way beyond the page depth which seemed odd to me.

I want to add a footer to a master page and the db listing is just trampling over any attempt at a footer. So my questions are:

  1. is there a way to forcibly restrict the size of a markup item?

  2. what’s the best way to add a standard footer to a (master) page - preferably which will move up or down with different page content? Something like the blue footer on this page - http://www.theleader.com.au/

  3. once I have set an item to be dynamic height (setting height to nil), is there a way to set it back to nominated height again?

I’ve come a long way in a couple of weeks but I clearly still have much to learn.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On 18/04/2012, at 8:44 PM, Mike B wrote:

Working with dynamic data and layers can be a pain, using a box model can help you get around these issues but I personally do not use layers for dynamic data ‘or rather rarely use’, I really find it a lot of work and I also find it can be restricting. I see no real disadvantage not using layers and the advantage is the page always comes out as I want it to be without having to worry about overlaps, wide areas of white space etc.

I’ve setup a page and added a HTML item, then embedded a markup item with the PHP in that. I’ve turned off layers for both but it still expands to contain all the text. I’m not sure what I’m doing wrong but I can’t seem to restrict the size.

Does anyone have a simple example of a box model file?

I am not sure how you are outputting the data in the markup item but you can limit the number of chars for data, I do this myself at times although I have a function I pass the data through which cuts the string to a certain length and then adds 3 full stops after the text. This might not suit your needs but there are many ways of doing this like adding a [ Read more ] after the text like: ‘and some te… [ Read more ]’ while linking the ‘Read more’ to the full text.

I do much the same thing but for neatness I do a substring search for a full point or end of line so the text always breaks at the end of the first sentence. I then add the read more link.

cheers

'k


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I’ve setup a page and added a HTML item, then embedded a markup item with the PHP in that. I’ve turned off layers for both but it still expands to contain all the text. I’m not sure what I’m doing wrong but I can’t seem to restrict the size.

OK, I think I’ve misunderstood. Re-reading a previous email suggests using box model is to ensure the page expands to suit the content rather than restricting it…


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

You could try adding Overflow: Hidden or Overflow: Scroll to restrict the visible area on your page. But this is kind of a “why do you want to do that” area. If your query returns X results, why would you only show Y of them to the user? Vertical space in a Web page is, for all practical purposes, infinite. All you need to do is construct an inline layout (or use the super-handy RPL Action to convert your static-size layout into one) and then the number of characters (‘at what font size?’, I ask you – remember, you do not control that at all) doesn’t matter.

Walter

On Apr 18, 2012, at 5:55 AM, Kim Kohen wrote:

I have a couple of pages where there’s PHP code which pulls rows from a database. No matter what I’ve tried, the markup area always grows to the complete depth of the returned results but I’d like to restrict it to a fixed size. I already limit the rows returned but as each row varies in size it’s not reliable. The data even extends way beyond the page depth which seemed odd to me.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On 19/04/2012, at 12:36 AM, Walter Lee Davis wrote:

You could try adding Overflow: Hidden or Overflow: Scroll to restrict the visible area on your page. But this is kind of a “why do you want to do that” area. If your query returns X results, why would you only show Y of them to the user?

Yeah, you’re right of course, I’m just frustrated trying to get a consistent footer on every page. In Rapidweaver I just pasted the PHP into a HTML page and the theme’s footer ‘just worked’, regardless of what was returned. It begs the question why Freeway can’t work this way.

All you need to do is construct an inline layout (or use the super-handy RPL Action to convert your static-size layout into one) and then the number of characters (‘at what font size?’, I ask you – remember, you do not control that at all) doesn’t matter.

I tried and failed with RPL a couple of days ago but clearly need to have another look. I guess the other option is to grab the footer code and echo it in the PHP pages that return large recordsets. I just hate doing that because it takes away the ‘master’ aspect of any links in the footer - I change something and have to go digging into individual pages to update them.

I was able to get a basic inline page working last night but it’s hard to see myself using it as it’s such a departure from the layer design method (I couldn’t get anything aligned properly), and the inability to use it as a master kinda defeats the purpose of master pages. Overall I’m super happy with Freeway, I’m just really surprised something as basic as a footer seems so hard.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options