Can I edit html in Freeway

Hi
I have been asked by a company trying to put a Twitter feed into my homepage to edit the html. They have supplied the code and told me to put it just before .
Can this be done in Freeway Pro? The last mention I can find on it here was in 2008 which mentioned Tim Plumb’s action. Has that been updated at all Tim?


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

Can you post the code (remove any account numbers) on Gist or Pastie, and post a link here? It’s hard to say without seeing the precise code. Note that Freeway is an HTML generator, not an editor. The document you work within may contain HTML snippets in various places, but the bulk of the page is generated on the fly when you publish, and Freeway does not stir around any existing HTML to make its layout. This can make it difficult (but not impossible) to insert bits of code precisely where you want them to go, but the benefit to you is a complete decoupling of layout from final code – no legacy in your final product.

Walter

On Dec 3, 2013, at 8:54 AM, Kevin McElligott wrote:

Hi
I have been asked by a company trying to put a Twitter feed into my homepage to edit the html. They have supplied the code and told me to put it just before .
Can this be done in Freeway Pro? The last mention I can find on it here was in 2008 which mentioned Tim Plumb’s action. Has that been updated at all Tim?

creativeline.co.uk


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

Hi Walt
They had previously asked me to change the page to php which I did, then this was their last instruction (I have tried making the change on the page using Insert HTML Mark-up Item, uploading, then opening the index page in TextWrangler and adding the code but it hasn’t worked:
We have now embedded our feed onto your site, however if you re-publish your site via your software this may overwrite the work we have done on the index.php file, if this happens please follow the instructions below

If you edit the html of the main index.php file locally via your software, there’s a couple of changes you need to do

Change 1:

search for the line (possibly 19 lines down or so):

add this just before

so it looks something like (The section in grey is already there):

/* twitter feed styling */ .jcarousel-container, .jcarousel-clip { height:300px /* amount of tweets displayed x 100 */; } .tweetbox { border:1px solid #ddd; color:#696969; } .tweetbox li { border-bottom:1px solid #ddd; } .tweetbox a { color:#4484A1; } .tweetbox a:hover { color:#4484A1; } .twitter-link { background-color:#4484A1; } .twitter-link a { color:#fff; } /* twitter feed layout */ #twitter-container { position:relative; } .jcarousel-container, .jcarousel-clip { width:100%; position:relative; } .jcarousel-prev, .jcarousel-next, .twitter-retweet, .twitter-link { background-image:url(twitter-sprite.png); background-repeat:no-repeat; } .jcarousel-clip { overflow:hidden; } .jcarousel-prev, .jcarousel-next { width:13px; height:30px; position:absolute; bottom:-30px; opacity:0.5; cursor:pointer; } .jcarousel-prev:hover, .jcarousel-next:hover { opacity:1; } .jcarousel-prev { background-position:0 -89px; right:25px; } .jcarousel-next { background-position:0 -139px; right:8px; } .jcarousel-prev-disabled, .jcarousel-next-disabled { visibility:hidden !important; } .tweetbox { font:13px/17px arial, sans-serif; margin:0; padding:0; list-style:none; } .tweetbox li { position:relative; margin:0; float:none !important; height:79px; padding:10px; } .tweetbox a:hover { text-decoration:none; } .tweetwhen { display:block; width:100%; position:absolute; left:0; bottom:-5px; } .tweetwhen a { font-size:11px; line-height:1; font-weight:bold; text-decoration:none } .twitter-time { position:absolute; left:10px; bottom:10px; } .twitter-reply, .tweetbox .twitter-favourite { display:none; } .twitter-retweet { opacity:0.5; display:block; width:21px; height:16px; background-position:4px -48px; text-indent:300px; overflow:hidden; position:absolute; right:10px; bottom:10px; } .twitter-retweet:hover { opacity:1; } .twitter-link { display:block; background-position:6px 8px; padding:0 0 0 28px; height:30px; font-size:11px; line-height:30px; } .twitter-link a { text-decoration:none; } .twitter-link span { font-weight:bold; } .twitter-link a:hover span { text-decoration:underline; }

Change 2:

where your old twitter feed used to be displayed you need to change the code to the following:

<?php include_once('twitterinsert.php');?>

Then re-publish your site.


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

You don’t need to open up the style tag in the page and add their code, that’s only one way to solve the problem. The simplest would be to open up your Page / HTML Markup dialog, switch to the Before section, and paste in this code:

(If you’re reading this in e-mail, then follow that link – don’t just paste it.) That’s just their part of the CSS, wrapped in a style tag so the browser knows what it’s for. It’s totally okay to have more than one style tag in the head of your page. The one that Freeway makes is separate from the one that you add, but the browser collates their rules and uses the combination of the two.

Now to get the PHP part into your page, I recommend that you use the Crowbar Action (download for free from ActionsForge). This will avoid an illegal construction in the final published code (a DIV inside a P) which Freeway would generate if you placed their code in a regular Markup Item. Locate the box in your layout named item12. Double-click inside that box so you get a flashing text cursor, and from the main menu, choose Insert / Action Item / Crowbar. Click once on the Action box so it is highlighted, and look in the Actions palette for the interface. Click on the Code button, and paste in just this code:

(Again, if you’re reading this in e-mail, follow the link, don’t paste it.)

Okay out of the code dialog, and publish. The Crowbar Action will keep Freeway from writing invalid code, because it will strip off the surrounding paragraph tag.

Walter

On Dec 3, 2013, at 10:48 AM, Kevin McElligott wrote:

They had previously asked me to change the page to php which I did, then this was their last instruction (I have tried making the change on the page using Insert HTML Mark-up Item, uploading, then opening the index page in TextWrangler and adding the code but it hasn’t worked:


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

Excellent, Thank you so much, works a treat.


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