Disable asides on a per-page basis in Octopress? - octopress

Hiding asides in Ocotopress seems to indicate how to do this on a site-wide basis, but I'd like to be able to have only specific pages collapse the sidebar.

To collapse the sidebar site-wide you add sidebar:collapse to _config.yml. To collapse the sidebar for a particular post or page, you add the same line to the YAML header for that post or page.

Related

Joomla 3 category RSS feed reveals Registered-only article

I am building a Joomla 3 website where some articles in a category are intended to be viewed only by registered users, while other articles in the same category are intended to be public.
In testing an article with the "Registered" access level, I find that article's content is revealed in the public Atom/RSS feeds for the category. My expectation is that the article content should not be there.
Here is my test:
http://incyanity.net/index.php/hote
This page is a Category List. The "Test" article correctly displays "Register to read more...". Additionally, in the menu at the top of the page, the drop-down list for this category correctly displays the Test link with a lock icon beside it. The menu item is set to public so visitors can see where the protected content is. Clicking on the menu item takes the user to an error page. Great! This is all desirable behavior.
Edit: I had the menu item set to public and it was working the way I described above, but when I tested just now it seems the behavior has changed again to allow guests to see the whole article. This now forces me to hide the menu item too which is not what I want to do. :( The whole article is still in the Atom/RSS feed though!
http://incyanity.net/index.php/hote?format=feed&type=atom
Both this feed and the RSS version shows the entirety of the body of the "Test" article. Why is this happening? I do want feeds available for people to follow public content published to this category, but anything that requires registration should not be included (or, ideally, the feed should only contain an entry that says something like "[Article Title] has been published. Log in at the website to view").
Since the menu item is set to public, I did try setting it to "Registered" on the off chance that had anything to do with this but the entire "Test" article still displayed in the Atom and RSS feeds.
I've tried asking for help on the official Joomla forum plus various searches on Google for solutions to this and unless my Google-fu is weak I just can't seem to find any answers. I feel like the behavior I'm looking for should be natively supported by Joomla given the integrated user access levels and ideally I want to solve this without turning to a third party plugin.
What am I doing wrong here? Thanks!
To review the configuration, you set:
Article manager options: Show unauthorized links "test"
Article options: View access level: registered;
The first option ensures that you get the links to the articles which have the "access level=registered", and that they show in blogs and category lists.
The second, sets the article's access level as Registered.
This is fine. But in order for Joomla to be able to show the articles in blogs, the introText of the article needs to be visible to all as well. Here comes the trick.
Just add a "Read more" tag (with the button at the bottom of the editor) in the article; the text after the tag will be hidden. The first part of the article needs to be visible to all, otherwise neither Joomla (nor search engines) would be able to show it.
So just add the read more tag... it's that easy. If you don't want any text showing you can start the article with it, but it's against your interest.

Magento Block for in CMS pages to display links associated with that page (set in admin)

So I would like to be able to add a block to certain CMS pages, which would display links for that page.
I am thinking it will use a common (custom) template, to display the links on each page in the same manner, but I need to be able to set the links in the admin side.
I had initially thought about using a widget. which seems to make sense, and wouldn't be too hard to be able to edit in the admin side and add to a page.
But I am not sure how I could create a widget which allows for the addition of multiple links, tied to that page.
Ideally, I could add a block in the cms layout xml, perhaps check if the url path is correct, and displays the links for that page in a block.
As I write this, I realize I am not sure what the best way to accomplish this would be.
I would rather not have it be editable in the content. But I am not sure how else to make it easy to add links to a page.
Is there some way I could create a module or something where you could choose the page in the admin side, set as many links as you want (with label and URL). and then on that page, the block would load the links into the block template?
Any direction, or even a place to start would be VERY helpful. Thanks!

tumblr custom pages and ask page

I'm creating a custom tumblr theme. Both the ask (/ask) and custom pages (/whatever-you-want) seem to be considered text posts:
{block:PermalinkPage}
<div>THIS IS A PERMALINK PAGE</div>
{block:Posts}
{block:Text}
{block:Title}<h2>THIS IS THE ASK OR CUSTOM PAGE TITLE: {Title}</h2>{/block:Title}
<!-- BOTH /ASK IFRAME BOX AND CUSTOM PAGES ARE PLACED HERE -->
THIS IS THE ASK IFRAME OR CUSTOM PAGE BODY: {Body}
{/block:Text}
{/block:Posts}
{/block:PermalinkPage}
I want to have a totally different layout for the ask page and the custom pages (no headers or footers on the custom page, no title, etc) and I don't care about the (real) text posts, because I'm not going to use them. Is there a way to have a different content from the "/ask" and the custom page without using javascript? I have read the documentation, but don't see anything that would allow me to do that... Is this possible?
Yes!
Just create a new page (towards the bottom of the Customise options).
If you choose Custom Layout, you can add any html you want and it will be detached from the main template.
Here is an example: http://madox-test.tumblr.com/test
If you check the site root you can see the tumblr template: http://madox-test.tumblr.com (which can still be used for other pages too).
Ref: http://www.tumblr.com/docs/en/pages#layouts
Luke

Single page website with SEO friendly ajax & history

I am busy building a single page website. The basic layout of the page is as follows - one section below the other:
Header & Navigation
Content Section 1 (example about us)
Content Section 2 (example products)
Content Section 3 (example clients)
Footer
Each section will have a small menu inside it to ajax the content for the specific section. So Products section will have a product title menu, once clicked, product details will be ajaxed.
I can do these with normal techniques, but the problem is, I need the site to be SEO friendly, and indexed/crawled by Google.
I've never worked with it before, but history.js looks promising. I've done some testing, but can't find resources for my specific question. I am also open to other suggestions. All Ajaxed content will be separate HTML files - for SEO, hence the use of history.js sounding good to me.
Specific Questions:
As the user scrolls down, passing each different section, the URL should
change appropriately.
The ajaxed content in each section should also change the URL.
Google should be able to crawl the site an index the separate pages.
I can change all of the content in a page with history.js, but is there a way to target my sections, so it only changes the content in my desired sections, instead of all content on the page?
I suggest using backbone.js. Its depending on jquery and underscore.js.
It provides you the following features
MVC architecture
It gives more structure to the client side code
Templating
You can maintain templates in the client side which gives you a more organized code.
URL re writing
Re-write urls on ajax calls. It Helps to develop SEO friendly website.

How to get back button to work with anchors (#) and iframes

I am working on a site where the main part of it is driven by an ajax style navigation system using anchors in the url to define the application state.
On top of this I now need to support IFrames that are loaded on top of this application. The problem I'm having is that the back button breaks if I make use of fragments.
I've created a very simple sample, that isn't using any of the ajax libraries. All it has is a link that adds an anchor to the url and an iframe, with some normal links in it.
If I click then anchor link first, then I click the link in the iframe, I would expect the first back click to take back to the original iframe page and the second click to remove the anchor from the url.
I'm aware of all the various solutions out there (YUI, reallysimplehistory, jquery plugin) and they all work great, but they don't cater for iframes.
I'm also aware that I could add some JS to the framed pages and possibly route all navigation through the parent page, but I'm hoping that isn't necessary.
So the question is, can anyone explain what is going on inside the history object in this sample? Secondly is there anything I can do from the parent iframe to coax the history object to pick up these navigation entries?
Note: I'm only enquiring about FF/Safari/Chrome in this sample. IE needs to looked at separately.
Refer to
JavaScript .hashchange performance. Can it bring any slowdown?
and
How does Gmail handle back/forward in rich JavaScript?

Resources