tumblr custom pages and ask page - themes

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

Related

Liferay 7.2: Open asset publisher viewURL in a Display Page Template

I am using Liferay 7.2. I want to display the viewURL link of an asset publisher in a Display Page Templates page. I couldn’t solve the problem. After searching, I realized that this problem can be solved in three ways:
Method 1:
1- As and admin, in Web Content>Structures create a structure (News Article) and make a Template for that structure.
2- Create page A and add an asset publisher. In this asset publisher: In Asset Selection choose Web Content Article as Asset Type and choose News Article as sub structure. In Display Setting tab choose View in Context as Asset Link Behavior.
3-In Site Builder>Pages create a Display Page Template (page B). Edit it and add an asset publisher similar to page A. However, in page B, in Configuration of asset publisher, in Display Settings choose Show Full Content as Asset Link Behavior and tick Set as the Default Asset Publisher for This Page and Show only assets with Page B as its display page template.
4-Create some News Article. In Display Page Template section, choose Specific Display Page Template and Page B.
In page A, everything is OK. However, when I click on ViewURL of an asset entry, it will redirect to page B. But, in asset publisher section of page B, no results is shown (There are no results.). Means that the chosen asset of page A is not shown in Display Page Template of page B.
Method 2:
Maybe the simplest method is editing Display Page Template (page B) in Section Builder>Content Display add Display Page Template. However, as stated in this issue , the display page content section only shows the summary and no style can be shown. Maybe it is necessary to edit abstract.jsp file. But, I don’t know how to do this.
Method 3:
Create a Widget Template and add it to page B. The article data of the selected asset can be obtained from the URL. However, I couldn’t get the data of the selected article.
I appreciate for any help in this regard.
An Asset Publisher instantiated in a Display Page Template won't show the page Web Content. One way to show an Web Content in a Display Page Template, is to instantiate a Fragment and map the Web Content fields to it, as shown here.
So, to solve your problem, you would need to change Page's B Asset Publisher to one or more Fragments, and map your News Article fields to them.
You could also map the Web Content to your own custom Fragmets, using Fragments lfr-editable fields
<lfr-editable id="unique-id" type="text">
This is editable text!
</lfr-editable>
Another way is to get the Web Content Java Object instance inside a Freemarker (a Fragment, Widget Template, Web Content Template, etc) with this snippet (only works for 7.3+)
${Request.INFO_ITEM}

How to access a specific Joomla File

Within an article in Joomla, I have the following code:
(loadposition file_download)
This line of code loads more code, but I cannot access it from the Articles page. How do I access the loadposition code?
On the web you are always striving to separate content from display. Here you are just setting up the display so that when the page renders items in the file_download position will render. That is the html for whatever is in file_download will be generated dynamically when the user looks at the page in the browser. In the editor you are just creating html. If you save the article and view it in the rendered form (i.e. in the Joomla frontend) you will see that loadposition will do its work of rendering whatever it is that file_download asks it to render. That is loadposition is a way to dynamically include content (which might include text, javascript, whatever) into an article.

Wordpress custom menu using Ajax

I am creating a website that has a huge number of forms that are called from a dynamically created menu. There may be a number of other pages on the site that are basic HTML layouts. I was thinking to use Wordpress as the controller for my site. That way I do not have to replicate the Wordpress layout features. I would need to do the following:
Have Wordpress get the contents of the menu using AJAX which would
return the descriptions and the links to the pages.
On selection of an option from the menu open the page in an iframe.
Is this even possible and, if so, where would I start?

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!

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.

Resources