kulersolutions / Rapid-Content

A cousin to popular ExtraContent script for RapidWeaver
2 stars 0 forks source link

Not just for HTML pages #1

Open seyDoggy opened 11 years ago

seyDoggy commented 11 years ago

While requesting bare HTML from HTML plugin pages with no theme applied will likely be the fastest method of loading, it will also scare most people away from using it.

Instead, why not let people use any page style (namely stacks) and use .load() to fetch only the bits of the document that are in a target container...

$('#rapidContainer'+i).load(RwGet.baseurl("rc/","rc" +i + ".html") + " #myRapidContainer" + i);

Using the target container will already be familiar to those used to ExtraContent, it can be made into a stack (like ExtraContent) and it will still work with bare HTML pages but works with other page types too.

kulersolutions commented 11 years ago

Hummm ... I like that ... your suggesting that #myRapidContainer be a stack and let users load it into content areas similar to EC.

Will have to play with it to see if it'll work.

seyDoggy commented 11 years ago

Yeah so they could make a stand-alone stacks page in the /rc/ directory just like they would with the bare HTML page, but this way they have the benefit of using stacks. --  Adam Merrifield seyDoggy vCard: seydoggy.com/vcard

On June 26, 2013 at 10:45:30 AM, Gary Byrd (notifications@github.com) wrote:

Hummm ... I like that ... your suggesting that #myRapidContainer be a stack and let users load it into content areas similar to EC.

Will have to play with it to see if it'll work.

— Reply to this email directly or view it on GitHub.

kulersolutions commented 11 years ago

Ok ... I just tested that out and it seems like its gonna work.

The only little issue I see with the script is that since it uses "baseUrl" instead of "pathto" then you can't see the content in RW preview until after the page gets published.

kulersolutions commented 11 years ago

Actually, what happens is that it tries to bring the entire page over into the new page ... ie Navbar, scripts, stylesheets etc ...

kulersolutions commented 11 years ago

I think it should actually be this:

jQuery('#rapidContainer'+i).load(RwGet.baseurl("rc/","rc" +i + ".html #myRapidContainer"+i));
seyDoggy commented 11 years ago

Yeah, that too. :) --  Adam Merrifield seyDoggy vCard: seydoggy.com/vcard

On June 26, 2013 at 11:14:16 AM, Gary Byrd (notifications@github.com) wrote:

I think it should actually be this:

jQuery('#rapidContainer'+i).load(RwGet.baseurl("rc/","rc" +i + ".html #myRapidContainer"+i)); — Reply to this email directly or view it on GitHub.

kulersolutions commented 11 years ago

Well, as far as I can see this will not work because individual stacks are reliant on the css and jscript that get placed in the head of the document. So the RC script will only bring in the DOM container and not the head scripts.

Unless, you know of a workaround

On Jun 26, 2013, at 10:20 AM, Adam Merrifield notifications@github.com wrote:

Yeah, that too. :)

Adam Merrifield seyDoggy vCard: seydoggy.com/vcard

On June 26, 2013 at 11:14:16 AM, Gary Byrd (notifications@github.com) wrote:

I think it should actually be this:

jQuery('#rapidContainer'+i).load(RwGet.baseurl("rc/","rc" +i + ".html #myRapidContainer"+i)); — Reply to this email directly or view it on GitHub. — Reply to this email directly or view it on GitHub.

seyDoggy commented 11 years ago

Scratch the myRapidContent target idea. Instead, you could make a shell theme that has nothing but the %plugin_header% and %content% macros in the index.html file and have people use that for their RC pages. What do you think? --  Adam Merrifield seyDoggy vCard: seydoggy.com/vcard

On June 26, 2013 at 1:52:59 PM, Gary Byrd (notifications@github.com) wrote:

Well, as far as I can see this will not work because individual stacks are reliant on the css and jscript that get placed in the head of the document. So the RC script will only bring in the DOM container and not the head scripts.

Unless, you know of a workaround

On Jun 26, 2013, at 10:20 AM, Adam Merrifield notifications@github.com wrote:

Yeah, that too. :)

Adam Merrifield
seyDoggy vCard: seydoggy.com/vcard

On June 26, 2013 at 11:14:16 AM, Gary Byrd (notifications@github.com) wrote:

I think it should actually be this:

jQuery('#rapidContainer'+i).load(RwGet.baseurl("rc/","rc" +i + ".html #myRapidContainer"+i));

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub.