The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Remove Primary Content Widget Details »» | |||||||||||||||||||||||||||
This is for removing the primary content widget from the CMS homepage/index and keeping it only on the pages you desire.
Only Admins will be able to see it on the CMS homepage/index for page setting purposes. Just put your mouse where the primary content box would be and you will see the edit pencil image come up. Many thanks to Lynne for the help. You MUST change the variables to the names of your pages. Examples: MY SITE URL/content.php?1-home 1-home is my CMS index so I would change 1-name_here to 1-home and the first line would look like: Code:
<vb:if condition="$_GET['r'] == '1-home' OR !$_GET['r']"> MY SITE URL/content.php?2-docs 2-docs is one of my CMS pages so I would change x-name_here to 2-docs and the line would look like: Code:
<vb:if condition="$_GET['r'] == '2-docs'"> Code:
<vb:if condition="$_GET['r'] == '2-docs' OR '3-pagename' OR '4-pagename'"> 1) Find the vbcms_content_section_page template 2) Replace contents with this. (You MUST change the variables to the names of your pages as shown in the examples above) Code:
<vb:if condition="$_GET['r'] == '1-name_here' OR !$_GET['r']"> <vb:if condition="is_member_of($vbulletin->userinfo, 6)"> {vb:raw css} <div class="title" align="right"> <vb:if condition="$can_publish"> <a href="{vb:raw edit_url}" class="edit"><img class="editimage" src="{vb:stylevar imgdir_cms}/edit_small.png" alt="{vb:rawphrase edit}" /></a> </vb:if> </div> </vb:if> </vb:if> <vb:if condition="$_GET['r'] == 'x-name_here'"> {vb:raw css} <div class="title"> <!-- section page title div --> <h1 class="header"> <span>{vb:raw title}</span> <vb:if condition="$can_publish"> <a href="{vb:raw edit_url}" class="edit"><img class="editimage" src="{vb:stylevar imgdir_cms}/edit_small.png" alt="{vb:rawphrase edit}" /></a> </vb:if> <vb:if condition="$vboptions['externalrss']"> <a href="external.php?do=rss&type=newcontent&sectionid={vb:raw nodeid}&days=120&count=10"><img src="{vb:stylevar imgdir_misc}/rss_40b.png" alt="{vb:rawphrase rss_feed}" /></a> </vb:if> </h1> <vb:if condition="!$published OR !$setpublish"> <span style="color:red"> <vb:if condition="$publishdate AND $setpublish"> {vb:rawphrase page_will_be_published_x {vb:raw publishdatelocal}} {vb:raw publishtimelocal} <vb:else /> {vb:rawphrase page_not_published} </vb:if> </span> <vb:else if condition="$publishdate" /> <vb:comment> {vb:rawphrase published_on_x {vb:raw publishdatelocal}} {vb:raw publishtimelocal} </vb:comment> </vb:if> </div> <!-- closes section page title div --> <vb:if condition="$filter_unpublished_url"> <a href="{vb:raw filter_unpublished_url}">{vb:rawphrase filter_phrase}</a> </vb:if> <div id="section_content"> {vb:raw content} <vb:comment Removed> <vb:if condition="!$no_results_phrase AND $showall"> <div class="fullwidth"> <a class="viewall" href="{vb:raw section_list_url}">{vb:rawphrase view_all}</a> </div> </vb:if> </vb:comment> <hr class="none" /> </div> <vb:if condition="$show['lightbox']"> <script type="text/javascript" src="clientscript/vbulletin_lightbox.js?v={vb:raw vboptions.simpleversion}"></script> <script type="text/javascript"> <!-- vBulletin.register_control("vB_Lightbox_Container", "section_content", {vb:raw vboptions.lightboxenabled}); //--> </script> </vb:if> <vb:if condition="$no_results_phrase"> <div class="fullwidth"> <p class="cms_article_txt_content"> {vb:raw no_results_phrase} </p> </div> </vb:if> <vb:if condition="$pagenav"> <div id="below_contentlist" class="fullwidth"> {vb:raw pagenav} </div> </vb:if> </vb:if> UPDATED CONDITIONAL STATEMENT TO SHOW THE EDIT PENCIL AGAIN TO ADMINS Tested and working in 4.2.1. Was: Code:
<vb:if condition="is_member_of($bbuserinfo, 6)"> Code:
<vb:if condition="is_member_of($vbulletin->userinfo, 6)"> Please mark 'Installed' if you are using this template edit. I will be happy to help if you are having problems getting it working. Screenshots
Supporters / CoAuthors Show Your Support
|
Comments |
#12
|
|||
|
|||
Hrm, I am having a problem, and not sure what is happening.
Code:
<vb:if condition="$_GET['r'] == '120-change-the-world' OR '121-clients' OR '122-directory' OR '124-news_1' OR '128-human-resources' OR '129-GGOB' OR '130-resources' OR '131-education'"> The end result I am shooting for is to have the PC hidden on 1-home, and visible on all the others. Any ideas? |
#13
|
|||
|
|||
Quote:
|
#14
|
|||
|
|||
Gamers - I was never able to get this particular solution to work, but Wayne_Luke's (over on vbulletin.com) is getting the job done for me - might check it out if you haven't.
|
#15
|
|||
|
|||
thanks jokorey, I founded and it works.
so easy, how did I not think of that? for anyone else looking for this you can find it here, https://www.vbulletin.com/forum/show...-in-a-section? |
#16
|
|||
|
|||
If (like me) all you want is to remove the primary content widget from all pages, just do this:
1) Find the vbcms_content_section_page template. 2) Enclose everything in between: <vb:comment> . . . </vb:comment> (comment it all out) |
#17
|
|||
|
|||
I just did this on a new v4.1.10 install and it is still working for me. Are you still have problems?
|
#18
|
|||
|
|||
4.1.11 my working vbcms_content_section_page template
PHP Code:
|
#19
|
|||
|
|||
Hi someone tell me how to find the vbcms_content_section_page template...please
|
#20
|
|||
|
|||
Hello, is this still an issue in 4.2? I'd hate to think that after moving all of my main pages to the CMS I will now get penalised for cloaking? I looked at the layouts and primary content looks to be the main content of the page? but it doesn't appear to be called a widget?
This is the first time I have used any kind of CMS on my site. |
#21
|
|||
|
|||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|