[Pro] Server Side Includes

I have a small list in a page that will have to be available for the client to change on his own.

Web Yep will not work in this case as the list is on a Carousel panel and Web Yep and Carousel do not play well together.

So, I am attempting to do a .inc file or a .txt file that the client can just change the list in a text editor and re-upload the file with each change.

I found an article in the Softpress knowledge base that deals with this, but the steps there are producing an error message on the page. I am not sure about this.

Also, when I try changing the individual item name in the 3rd panel of the inspector, the Freeway program is adding characters to the file name that I am not typing. Freeway is adding

a]

before the name before .inc extension at the end of the file.

Not sure why all of this is happening, but it is and I need some pointers here.

Thanks,

Rich


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

Wow. I wrote that article in 2002 or so. The error you’re getting is probably because your host hasn’t enabled server-side includes, or uses a different syntax than the article anticipated.

How sophisticated is this client of yours? If they don’t mind editing HTML in a text editor, you could make an HTML fragment containing only the list:

<ul>
    <li>Item one</li>
    <li>Item two</li>
    <li> ... </li>
</ul>

and save that on the server in the same folder as your page, named mylist.html. Then in your page, draw an HTML box where you want the list to appear, type some text in it (one word is enough), make note of the name Freeway assigns that box (item23 or similar) and then add Protaculous to your page. Choose scriptaculous-packed from the Library menu, then click on the top Function Body button and paste in the following (modify the name of the box where you see item23 below to match your actual box name – case-sensitive).

new Ajax.Updater('item23','mylist.html',{method:'get'});

This will do a JavaScript “include” before the page displays, using the same JavaScript library as your Carousel (no conflicts!) and the only thing that this will not do is feed this content to the search engines – they don’t run the JavaScript, so they don’t see that list content. As long as this isn’t a huge problem, this is the simplest way to solve this problem.

Walter


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

If you make a WebYep item with the setting “global” it does not have to be edited in a carousel.

The edits could be made on another “static” page by duplicating the WebYep global item.

Perhaps have an admin page where the client can edit “global” items

David

On 2 May 2011, at 17:08, “sampolfonz” email@hidden wrote:

Web Yep will not work in this case as the list is on a Carousel panel and Web Yep and Carousel do not play well together.


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

Guys,

Both ideas I will explore. Thanks, so much !!!

Walter,

Is there a way to style this text (color, font, size)

David,

Could this web yep item be named, so that it only effects the correspondingly named item on my carousel page ??

Will have to try these.

Thanks,

Rich


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

When you create a WebYep item, in the actions palette there is a tickbox called global. When ticked wherever a copy of this item is placed in your web site it will display the same edited data.

You would mostly use this for footer information (same on every page). It’s also useful for difficult to edit places like JavaScript animations.

David

On 2 May 2011, at 19:03, “sampolfonz” email@hidden wrote:

Could this web yep item be named, so that it only effects the correspondingly named item on my carousel page ??


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

Walter,

Is there a way to style this text (color, font, size)

Sure, just add the requisite HTML in the mylist.html include file, and it will inherit whatever style you like.

Try this trick: make an HTML box somewhere on the pasteboard (above the page works best) and put a couple of lines of text in it.

Use the Edit Style dialog to make a new Paragraph Style with the List attribute set the way you like, and any color or font choices all rolled into that same style.

Now select all the text in your pasteboard box and click once on the new style you made. By doing this, you force Freeway to add that style to the page or stylesheet, where your external fragment can find it.

So if your style is called .myNewStyle in the list of named styles, in your mylist.html file, you would simply use this code to replace the first line:

<ul class="myNewStyle">
...

…and now your list will have whatever style you defined in the Styles palette.

Unless you’re using the External Stylesheets option in Freeway’s publish settings, you will want to add this little off-screen box on the same page where you are including the list, that way the style will already be in the page when the external code requests it by name.

Walter


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