Send Radiant mailing list submissions to
radiant@radiantcms.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.radiantcms.org/mailman/listinfo/radiant
or, via email, send a message with subject or body 'help' to
radiant-requ...@radiantcms.org
You can reach the person managing the list at
radiant-ow...@radiantcms.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Radiant digest..."
Today's Topics:
1. Creating a UL/IMG based Navigation Bar (Jeff Casimir)
2. multi_site extension and mysql error (Daniel O'Connell)
3. Re: Back Door conditionals iffy? (Steven Southard)
4. Re: Re: Possible to disable cache for a single page?
(Nicholas Henry)
----------------------------------------------------------------------
Message: 1
Date: Sat, 13 Jun 2009 13:25:07 -0400
From: Jeff Casimir <j...@casimircreative.com>
Subject: [Radiant] Creating a UL/IMG based Navigation Bar
To: radiant@radiantcms.org
Message-ID:
<70dad9df0906131025m6d3b4894ue9f4882459f5d...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Hi All,
Today is my first day building my site with Radiant -- I'm loving it!
Once I got the basic layout, snippets, and pages implemented, I had to
figure out my navigation bar. It took me some tinkering, so I thought
I'd post the results on the wiki:
http://wiki.github.com/radiant/radiant/creating-a-ul-img-based-navigation-bar
I'd appreciate any feedback or redirection if I did something ugly. I
wrestled with the wiki for a few minutes trying to figure out why
those extra grey spaces were showing up under each code block, but I
didn't crack the problem.
- Jeff
------------------------------
Message: 2
Date: Sat, 13 Jun 2009 14:15:35 -0600
From: Daniel O'Connell <d...@mac.com>
Subject: [Radiant] multi_site extension and mysql error
To: radiant@radiantcms.org
Message-ID: <be0a9d26-49db-4d96-a1b6-0baa61220...@mac.com>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
Hello to all,
My first post to any list. I am new to radiant and rails and head long
into my first project, a client website.
I'm trying to install multi_site on Radiant 0.7.1. Using "script/
extension install" leads to a version that seems
to be for radiant 0.8.0 (see multi_site_extension.rb) and will not
correctly migrate.
The very kind Josh French gave me instruction to check out the 0.7.1
tagged version, but I am still having problems
Upon migrating getting mysql error:
== 3 AddBaseDomainToSites: migrating
==========================================
-- add_column(:sites, :base_domain, :string)
rake aborted!
Mysql::Error: Duplicate column name 'base_domain': ALTER TABLE `sites`
ADD `base_domain` varchar(255)
Restarted server hoping for the best, but Radiant crashes with an
"Application Error" and I cannot login to admin and public site
doesn't function.
Using ray I disabled the extension and site is back online, but I
really need this extension to work properly. Any ideas?
Always Victory!
-Daniel
------------------------------
Message: 3
Date: Sat, 13 Jun 2009 15:16:17 -0500
From: Steven Southard <ste...@stevensouthard.com>
Subject: Re: [Radiant] Back Door conditionals iffy?
To: radiant@radiantcms.org
Message-ID: <37a56ee1-1eb1-4b1d-a63b-a1e61c441...@stevensouthard.com>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Of course, that is much better. I sure like the idea of Back Door
but giving up caching seems a high cost.
On Jun 13, 2009, at 5:05 AM, Jim Gay wrote:
It would appear that caching is not a good idea with that
extension. I think you would be better served using Microsoft's
conditional comments.
Jim
On Jun 13, 2009, at 2:26, Steven Southard
<ste...@stevensouthard.com> wrote:
Sure seem to be, which makes me wonder how this example shown at
http://backdoor.rubyforge.org/ could ever be reliable.
<r:if cond="request.env[ 'HTTP_USER_AGENT'] =~ /MSIE/">
<!-- Internet Explorer needs some ugly hacks to render PNG
images with transparency -->
<div id="logo"
style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader
(src=\'/images/logo.png\',sizingMethod=\'scale\');"></div>
<r:else>
<!-- the rest of browsers just make it rigth -->
<img src="/images/logo.png" id="logo" alt="Logo"/>
</r:else>
</r:if>
On Jun 12, 2009, at 7:19 PM, Steven Southard wrote:
Not sure if this a problem with browsers in general or Back Door
but the following code only works maybe 80% of the time. It
always give an answer and never gives both. It will sometimes
say, "is IE" on other browsers and sometime say "not IE" on an ie
browser. Using if and else has the same results. Any suggestions?
<r:if cond="request.env['HTTP_USER_AGENT'] =~ /MSIE/">
is IE
</r:if>
<r:unless cond="request.env['HTTP_USER_AGENT'] =~ /MSIE/">
not IE
</r:unless>
Steven
_______________________________________________
Radiant mailing list
Post: Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant
_______________________________________________
Radiant mailing list
Post: Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant
_______________________________________________
Radiant mailing list
Post: Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant
------------------------------
Message: 4
Date: Sun, 14 Jun 2009 11:39:44 -0400
From: Nicholas Henry <nicholas.he...@gmail.com>
Subject: Re: [Radiant] Re: Possible to disable cache for a single
page?
To: radiant@radiantcms.org
Message-ID:
<ee11ef4a0906140839s3d1f585k40b18515829f5...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Hello Drew,
Makes perfect sense! Thank you very much for taking the time to
provide this explanation -- much appreciated.
Cheers,
Nicholas
On Thu, Jun 11, 2009 at 7:44 PM, Andrew
Neil<andrew.jr.n...@googlemail.com> wrote:
This is an old thread that I have been meaning to follow up. Sean
suggested:
that one
should focus on the _why_ you need an uncached page in the first
place, and address that need first
Indeed!
I created a route:
map.with_options(:controller => 'site') do |site|
site.connect 'store-directory/:name', :action => 'show_page',
:url => '/store-directory/store'
end
This captures URL's like these:
/store-directory/mcdonoughs-your-independent-grocery
/store-directory/carlton-cards
A better solution would be to create a new model called StorePage,
inheriting from Radiant's Page model. You can override the
find_by_url
method, so that the StorePage would behave as an 'index' page, or a
'show'
page. For example:
/store-directory
Would be an index page, listing all your stores
/store-directory/mcdonoughs-your-independent-grocery
/store-directory/carlton-cards
These would be 'show' pages, for individual stores.
You would only need to create a single StorePage in your Radiant
sitemap. In
the above example, this would have the slug 'store-directory'. Each
of the
sub-pages, corresponding to individual Store models, would exist as
'virtual
pages'. You won't see them in the sitemap of the Radiant admin, but
they
exist on the public facing site.
If you use this approach, you don't need to create any custom
routes. The
index/show pages would both be rendered using the
SiteController#show_page
action. This should mean that caching works just as you would
expect. So the
/store-directory page and /store-directory/carlton-cards pages
would be
cached without interfering with each other.
Here is an example of a model that overrides the page model:
http://github.com/nelstrom/radiant-movies-extension/blob/97b149f84f75e887dd37261acdee3ebd6570b26c/app/models/movie_page.rb#L5-17
Note the tags: <movies:if_index/> and <movies:unless_index/>. The
content
for the index page should go inside the if_index tag, and the
content for
the 'show' pages should go inside the unless_index block.
I hope this helps clear things up.
Cheers,
Drew
_______________________________________________
Radiant mailing list
Post: Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant
------------------------------
_______________________________________________
Radiant mailing list
Post: Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant
End of Radiant Digest, Vol 39, Issue 15
***************************************