1

Topic: head_sidebar_main ???

Hello,

I am desperately trying to modify head_sidebar_main to put the widgets in the correct order, however, I cannot find where I can edit it within the admin section of TextPattern.

Please help!

2

Re: head_sidebar_main ???

If you go to "Presentation/Form" you can edit the order.
Basically there is a lot of lines like this:

<txp:output_form form="head_widget_author" />

If you change the order of these lines you will also change the order of appearence on the actual site.

3

Re: head_sidebar_main ???

Thank you for your quick reply. Unfortunately, I still don't see the code where I can modify head_sidebar_main.  I am specifically looking for the code in the attached picture. I don't see it anywhere when I go to the Presentation/Form page. Any ideas? http://www.cammamidesign.com/txp_sidebar_form.jpg

4

Re: head_sidebar_main ???

You mention "the corect order". I assume you want to sort the widgets to match what you like? Like first the author, then the twitter, followed by a text box.
If that is what you want you can take the code you showed in your screenshot and re-arrange the lines, so that the lines are like so:

<div id="sidebar" class="col-<txp:if_variable name="display_sidebar_left_or_right" value='left'>left</txp:if_variable><txp:if_variable name="display_sidebar_left_or_right" value='right'>right</txp:if_variable>">

<txp:if_section name='<txp:variable name="main_articles_section" />'>
<txp:output_form form="head_widget_author" />
<txp:output_form form="head_widget_twitter" />
<txp:output_form form="head_widget_text2" />
<txp:else />

<txp:output_form form="head_widget_author" />
<txp:output_form form="head_widget_twitter" />
<txp:output_form form="head_widget_text2" />

</txp:if_section>

</div> <!-- /#sidebar -->

5

Re: head_sidebar_main ???

Hey Stephen, yes, that is correct and I understand how to do that. My problem is I can't seem to find the initial code to change this. When I go to Presentation/Forms and look at the code, I don't see...   <div id="sidebar" ....

Instead, this is the code I see in the box and I can't see where I can modify the sidebar :-(
  (I really appreciate your help!!!)



<div class="box">
<div class="post">

<txp:if_custom_field name="utube_video_id">
<div class="video"><object type="application/x-shockwave-flash" style="width:590px; height:420px;" data="http://www.youtube.com/v/<txp:custom_field name="utube_video_id" />"><param name="movie" value="http://www.youtube.com/v/<txp:custom_field name="utube_video_id" />" /></object></div>

<txp:else />

<txp:if_custom_field name="vimeo_video_id">
<div class="video"><iframe src="http://player.vimeo.com/video/<txp:custom_field name="vimeo_video_id" />?title=0&amp;byline=0&amp;portrait=0" width="590" height="332" frameborder="0"></iframe></div>

<txp:else />

<txp:if_custom_field name="article_advert_image" value="">
<txp:if_variable name="display_article_advert(yes_or_no)" value='yes'>
<txp:if_section name='<txp:variable name="main_articles_section" />'>
<txp:if_individual_article>
<div class="advert alignright"><txp:if_variable name="article_adverts_url" value=""><txp:else /><a href="<txp:variable name="article_adverts_url" />"></txp:if_variable><img src="<txp:site_url />ads/<txp:variable name="article_adverts_image" />" alt="advert" /><txp:if_variable name="article_adverts_url" value=""><txp:else /></a></txp:if_variable>
</div> <!-- /.advert -->
</txp:if_individual_article>
</txp:if_section>
</txp:if_variable>

<txp:else />

<txp:if_individual_article>
<div class="advert alignright"><a href="<txp:custom_field name="article_advert_url" />"><img src="<txp:site_url />ads/<txp:custom_field name="article_advert_image" />" alt="advert" /></a>
</div> <!-- /.advert -->
</txp:if_individual_article>
</txp:if_custom_field>

<txp:if_article_list><txp:if_article_image><txp:images><img class="image thumbnail <txp:custom_field name="article_image_alignment" />" src="<txp:site_url />thumb.php?src=<txp:image_url />&amp;w=<txp:variable name="thumbnail_width" />&amp;h=<txp:variable name="thumbnail_height" />&amp;zc=1&amp;q=90" alt="<txp:title />" /></txp:images></txp:if_article_image></txp:if_article_list>

</txp:if_custom_field>
</txp:if_custom_field>

<txp:if_individual_article>
<h1 class="title"><txp:title /></h1>
<txp:else />
<txp:if_section name="about,contact">
<h2 class="title"><txp:title /></h2>
<txp:else />
<h2 class="title"><txp:permlink><txp:title /></txp:permlink></h2>
</txp:if_section>
</txp:if_individual_article>
<txp:if_section name=',<txp:variable name="main_articles_section" />,default,tag'>
<p class="post-meta"><img src="<txp:site_url />site-design/ico-time.png" alt="" /><txp:posted /><txp:if_article_list><txp:if_comments_allowed><span class="comments"><img src="<txp:site_url />site-design/ico-comment.png" alt="" /><txp:comments_invite /></span></txp:if_comments_allowed></txp:if_article_list></p>
</txp:if_section>

<div class="entry">
<txp:if_section name=',<txp:variable name="main_articles_section" />,archive,default,tag'>
<txp:if_article_list>
<txp:rss_auto_excerpt words="50" showlinkwithexcerpt="0" />
<p class="more"><span class="read-more"><a href="<txp:permlink />" title="<txp:title />" class="btn">Read more</a></span></p>
<txp:else />
<txp:body />
</txp:if_article_list>
<txp:else />
<txp:body />
</txp:if_section>
</div> <!-- /.entry -->

<div class="fix"></div>

<txp:if_section name='<txp:variable name="main_articles_section" />'>
<txp:if_variable name="display_article_share_block(yes_or_no)" value='yes'>
<txp:if_individual_article>
<div id="share">
<div class="banner">Share</div>
<txp:output_form form="head_social_bookmarks" />
</div> <!-- /#share -->
</txp:if_individual_article>
</txp:if_variable>
</txp:if_section>

</div> <!-- /.post -->

<txp:if_section name=',<txp:variable name="main_articles_section" />,default'>
<txp:variable name="cat2" value='<txp:category2 />' />
<div class="post-bottom">
<div class="fl"><span class="cat"><txp:category1 title="1" link="1" /><txp:if_variable name="cat2" value=""><txp:else />, <txp:category2 title="1" link="1" /></txp:if_variable></span></div>
<div class="fr"><txp:tru_tags_from_article wraptag="span" class="tags" break=", " /></div>
<div class="fix"></div>
</div> <!-- /.post-bottom -->
</txp:if_section>

</div> <!-- /.box -->

<txp:if_section name='<txp:variable name="main_articles_section" />'>
<txp:if_individual_article>

<div class="more_entries">
<div class="fl"><txp:link_to_prev><txp:prev_title /></txp:link_to_prev></div>
<div class="fr"><txp:link_to_next><txp:next_title /></txp:link_to_next></div>
<div class="fix"></div>                       
</div> <!-- /.more_entries -->

<txp:output_form form="comments_display" />
</txp:if_individual_article>
</txp:if_section>

6 (edited by stephan 2010-11-29 19:05:28)

Re: head_sidebar_main ???

On the right hand side scroll down and there is a section labelled "Misc". There you can find the side bar form. If you can ignore the German language maybe this helps:
http://yauh.de/images/sidebar.png
Look at the right bottom to know which form to edit.

7

Re: head_sidebar_main ???

PERFECT!!! Thank you so much!!!
Exactly what I was looking for!!!

I am an extreme novice/beginner at this so thank you, thank you, thank you!