Tumblr Custom HTML - tumblr

On Tumblr I want to have a 2 column format. That is, a main column plus a right column for the home page. But on the article page I want only the main column.
How can I edit the standard Tumblr theme to achieve this?

Use jQuery to display/hide the extra column et resize the main depending on what window.location returns.
EDIT:
If you prefer not to use jQuery, look at the {block:IndexPage} on the tumblr theme documentation

Wrap the column you want to hide in a {block:index}{/block:index} and it will only show in the home page, if it still dont work, wrap the column in a div and hide it useing css, like:
{block:permalinkpage}
.your-wrap {display:none;}
{/block:permalinkpage}

Related

Sub page content rendering using vhs?

Requirement is simple , Want to render the content of sub page in main page.
Is it possible using vhs extension ?
I want to render all the sub-page content in [9]Zweckverband Parent Page.
Requirement is fully dynamic , sub-pages can increase and we need to render all the sub page content in parent [9] page.
we can render the menu using vhs , and can render the page content using vhs.
We need to combine both the coding to achieve this requirement.
Thanks in advance !
You can just render a menu of the subpages, but instead rendering a menu item for each of them, render their content (and maybe a headline or something). Rendering the content of an arbitrary page can be done with
<v:content.render pageUid="{currentPage}" column="0"/>
Other content retrieval viewhelpers should also have the pageUid parameter, so you could use them as well.
One thing that could come up is caching: If a subpage is changed, the rendering result of the main page changes. But probably TYPO3 won't recognize that, because the content on the main page itself didn't change. You might want to look into the clearCacheCmd and the like to solve that.

Tumblr: add pages to custom theme

I am creating a custom theme with HTML and want to create a navigation menu for my pages. I am not sure how to do this however.
I have tried to add:
{block:HasPages} {/block:HasPages}
and
{block:Pages} {/block:Pages}
but nothing appears.
Do I just have to hard code the links into the theme? Is there no way to do this dynamically?
You must have one or more Custom Page(s)
Each Custom Page must have Show Link enabled
The code block to show links to the Custom Page(s) is as follows:
{block:HasPages}
{block:Pages}
{Label}
{/block:Pages}
{/block:HasPages}
Code per the Tumblr HTML Guide.

Show only title (with linked) on tumblr index

I'm looking for a way to only show posts titles (with link) on my tumblr index, and then show the entire post when you click.
I know about the "cut" function, but i want to simple hide the whole content on the index page only.
Simply use {block:IndexPage} to show the post titles and {block:PermalinkPage} to show all of the content.
Unfortunately, only three Tumblr post types support titles: Text, Chat and Link.

How to make Facebook like button narrower than 225px?

I'm generating a like button with Facebook's 'standard' layout for my site via https://developers.facebook.com/docs/reference/plugins/like/ . I've set its width to 200 pixels, but notice that setting it to lower than 225 pixels has no effect, and the documentation on that page indeed specifies 225px as the minimum width for the standard layout. Unfortunately I need to make it 200 pixels wide to fit my site's design. Is there any way to force it into this width?
(The site's at http://gwwc2.centreforeffectivealtruism.org/ if you want to have a play with Firebug, though the like button gets generated by javascript so you'd probably have to duplicate that page and edit its source.)
The reason for the width restriction is the text displayed to non logged in users.
You'll find that if you shrink lower than 225px for that button style some users will find your layout disrupted (I've tried exactly this, the results were not good).
You can, however, choose a different button style.
Uncheck the send button option
Choose the button_count option
Set the width to 200px
Uncheck show faces
And you'll get this:-
<div class="fb-like" data-href="http://www.example.com" data-send="false" data-layout="button_count" data-width="200" data-show-faces="false" data-font="arial"></div>
Which fits your width requirement. Using box_count will also work well.
Take out &width=225 in the iFrame src attribute and pass no width at all. In the iframe style attribute, specify a css value width:200px; If you pass a value smaller than the minimum in the source URL, facebook will ignore it, but if you custom style the iframe itself to be that width, the contents will squeeze inside.
Create a CSS rule that states iframe { width:200px !important; )
I would make that rule specific to whatever DIV or container your Facebook widget is inside of. And of course, if it looks bad after you do this, you can take it out. But if you're just including a "Like" button (no faces), it should work.

jquery hide show

I have a table generated from database ( basically in MVC view). I want to make it editable. I want to use jquery to hide the row when edit button infront of row is clicked and show the row in edit format which is by default hidden. how can I do this using jquery?
Please suggest solution
Thanks
I was able to accomplish this by tagging the table row with a fake class name, then in the button click events I used jquery's Hide/Show. Like this:
In your edit button click event call this:
$('.trMyRowIWantToHide').hide();
And tag your table row with a fake class like this:
<tr class="trMyRowIWantToHide">
JQuery Show
http://api.jquery.com/show/
JQuery Hide
http://api.jquery.com/hide/
You also may want to make use of div tables for this project instead of actual tables. You selectors such as $("#idofcolumn").toggle(); to hide and show the div or in your case you would probably want to show a text field. You could even .html() to replace the text in a column with a text box. There are several ways to go about this. Check out the JQuery documentation.
http://docs.jquery.com/Main_Page
How exactly is the HTML set up for your rows? Normally you could do $('SELECTOR').toggle() on each of them.