[Pro] Suggestions For Holding Markup

Hopefully an easy question here.

Is there a way to load an external text file (or html, php file) that has some markup code in it to be put in a specific area when Freeway publishes the page?

For instance, on a site I am working on, we are using a ton of markup code for this one section and it’s locking up Crowbar and regular Markup Items to the point that it crashes Freeway possibly due to memory. Now the markup here is only going to get bigger, so I was wondering if there was a way (or an action already exists) for an external text file that only has this markup in it to be attached and the content is then put into a specific area right in Freeway?

(Now that I write this it sounds more complicated than I thought)

OR

What would you suggest for placing large amounts of markup code into a specific section of a page so it doesn’t crash Freeway?


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

What is this markup written in? What language? There’s an Action for
PHP:

http://www.actionsforge.com/actions/view/131-php-external-markup

This inserts the linked file into the Before HTML section using a PHP
include() statement. So it wouldn’t work for another language, and it
wouldn’t place the code inside the visible page for you.

I know there’s some limit to the amount of text you can paste into a
fwBigText dialog, which is what CrowBar uses for its input. I don’t
recall what it is off-hand, I know Tim Plumb looked into it some years
back because it was affecting his Source Code Snooper Action, which
Crowbar borrows from shamelessly.

There’s another technique for getting large amounts of text into a
Freeway page, but I haven’t tried it in a long time. Basically, you
save your file with a .inc file extension. Then draw an HTML box on
your page where you want that code to be inserted, and while the box
is selected, use the File / Insert command to link to the inc file.
When the page is published, the code from the inc file is inserted raw
into your page at the point of the HTML box, and I believe the HTML
box (DIV or TD) is also generated to wrap it. But as I said, I haven’t
tried that trick in years and years.

Walter

On Jan 6, 2011, at 2:48 PM, Dan J wrote:

Hopefully an easy question here.

Is there a way to load an external text file (or html, php file)
that has some markup code in it to be put in a specific area when
Freeway publishes the page?

For instance, on a site I am working on, we are using a ton of
markup code for this one section and it’s locking up Crowbar and
regular Markup Items to the point that it crashes Freeway possibly
due to memory. Now the markup here is only going to get bigger, so
I was wondering if there was a way (or an action already exists) for
an external text file that only has this markup in it to be attached
and the content is then put into a specific area right in Freeway?

(Now that I write this it sounds more complicated than I thought)

OR

What would you suggest for placing large amounts of markup code into
a specific section of a page so it doesn’t crash Freeway?


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

Actually, this one doesn’t do what I wrote…

On Jan 6, 2011, at 3:02 PM, Walter Lee Davis wrote:

What is this markup written in? What language? There’s an Action for
PHP:

PHP External Markup - ActionsForge

This inserts the linked file into the Before HTML section using a
PHP include() statement. So it wouldn’t work for another language,
and it wouldn’t place the code inside the visible page for you.

This one does:

http://www.actionsforge.com/actions/view/132-php-include-php-page

Walter


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

Gaaaaaaa!

There’s so many of them. Really, I promise! This is The One:

http://www.actionsforge.com/actions/view/138-php-use-include-pages

Walter

On Jan 6, 2011, at 3:07 PM, Walter Lee Davis wrote:

Actually, this one doesn’t do what I wrote…

On Jan 6, 2011, at 3:02 PM, Walter Lee Davis wrote:

What is this markup written in? What language? There’s an Action
for PHP:

PHP External Markup - ActionsForge

This inserts the linked file into the Before HTML section using a
PHP include() statement. So it wouldn’t work for another language,
and it wouldn’t place the code inside the visible page for you.

This one does:

PHP Include PHP Page - ActionsForge

Walter


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

This markup is just php code that has a lot of “if” statements in it.

That .inc idea sounds like what I want to do. Is this documented anywhere?

Let me try it and post back.


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

Not sure how to ‘File / Insert’ in your instructions. Is that the same as ‘Link to file’?


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

Hi dan I think I have an action that does that
let me have a look

max


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

Alright, sounds like this is possible. Great. I’ll await to hear from Max or Waltd.


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

On 6 Jan 2011, 7:24 pm, Dan J wrote:

Not sure how to ‘File / Insert’ in your instructions. Is that the same as ‘Link to file’?

I believe Walt means to use the File menu and select the Import option, similar to adding a graphic.


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

In that case, then put all of it in a text file named something.php,
and put just this little bit into Crowbar:

<?php require_once('Resources/something.php'); ?>

And use Upload Stuff to put it there (and track changes and upload
when you change that external file). This is how I built the first
Softpress Store in Freeway 3.

Done and done. You’ll be able to edit that PHP code using an
industrial-strength editor, instead of Freeway’s just-barely-better-
than-a-textarea editor, and you won’t have to worry about version
control, because the Upload Stuff Action will track when that external
file becomes “dirty”.

Walter

On Jan 6, 2011, at 3:19 PM, Dan J wrote:

This markup is just php code that has a lot of “if” statements in it.

That .inc idea sounds like what I want to do. Is this documented
anywhere?

Let me try it and post back.


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

aahhh
nope just chewcked I was mistaken
it just pulls in scripts into the head or body ect
not anywhere specific

sorry

max

ps the bigpromt seems to crash freewat at about 32k or there abouts

max


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

Oh my god look at my spellings thats a cracker…chewcked and freewat!!!
you can tell I did this while I was watching the TV!!!

max


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

Just checked, the .inc thing works fine in 5.4.2. Plain text file,
saved as whatever.inc. Draw an HTML box, while the handles are
showing, choose File / Import from the main menu, navigate to your
file. You will see a little HTML icon in the top-left corner of the
HTML box on your screen, but nothing else from a visual standpoint in
the design view.

When you publish, the HTML generated by Freeway will be merged with
the contents of this text file. The HTML code necessary to render the
HTML box you drew will also be generated, so you may not want that,
but there’s no way to avoid it in this technique.

It’s important to note that you are creating a sort of “design-side
include”, not to be confused with a server-side include. The code
generated by Freeway includes all the text in your external include
file, and it all gets merged into one file.

So benefit: you don’t have to track multiple files. Demerit: it
encourages “spaghetti code” with a lot of logic peppered into your
structural and presentational code, and repetition of code from page
to page which could be better managed using includes on the server.

Walter

On Jan 6, 2011, at 3:31 PM, max wrote:

Oh my god look at my spellings thats a cracker…chewcked and
freewat!!!
you can tell I did this while I was watching the TV!!!

max


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

The instructions you posted above don’t work in 5.5. The import feature for me is grayed out when I get to the part that reads “…while the handles are showing, choose File / Import from the main menu, navigate to your file.

However, the other method of using the one line of PHP code works great. Thank you. That will be a huge time saver as the site gets bigger.


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

It works for me in 5.5. Here is the KB article on includes (both server side and design time);
http://www.softpress.com/kb/questions/62/Server+Side+Includes
Regards,
Tim.

On 6 Jan 2011, at 21:25, Dan J wrote:

The instructions you posted above don’t work in 5.5.

FreewayActions.com - Freeware and commercial actions for Freeway Express & Pro.

Protect your mailto links from being harvested by spambots with Anti Spam.
Only available at FreewayActions.com

http://www.freewayactions.com


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

I think I was hungry when I wrote that!

Walter

On Jan 6, 2011, at 7:46 PM, Tim Plumb wrote:

It works for me in 5.5. Here is the KB article on includes (both
server side and design time);
http://www.softpress.com/kb/questions/62/Server+Side+Includes
Regards,
Tim.

On 6 Jan 2011, at 21:25, Dan J wrote:

The instructions you posted above don’t work in 5.5.

FreewayActions.com - Freeware and commercial actions for Freeway
Express & Pro.

Protect your mailto links from being harvested by spambots with Anti
Spam.
Only available at FreewayActions.com

http://www.freewayactions.com


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

The reason why I couldn’t get it working is because the HTML item I was trying to import into had an undefined height to it. It grayed out the ‘Import’ option and therefore I could not import the file.

Tim, I read the KB article and found Waltd’s method ridiculously easier than that. Thanks for sharing though as, again, this has saved me huge amounts of time.


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