Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Remove Primary Content Widget Details »
Remove Primary Content Widget
Mod Version: 1.00, by tommyxv (Member) tommyxv is offline
Developer Last Online: Oct 2015 I like it Show Printable Version Email this Page

vB Version: 4.x.x Rating: (2 votes - 5.00 average) Installs: 21
Released: 17 Aug 2011 Last Update: Never Downloads: 0
Not Supported Template Edits Re-usable Code  

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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

If you have multiple pages then the line above will look something like this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.




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)


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.



UPDATED CONDITIONAL STATEMENT TO SHOW THE EDIT PENCIL AGAIN TO ADMINS Tested and working in 4.2.1.

Was:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Updated to:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Please mark 'Installed' if you are using this template edit. I will be happy to help if you are having problems getting it working.

Download Now

Only licensed members can download files, Click Here for more information.

Supporters / CoAuthors

Screenshots

Click image for larger version

Name:	screen1.png
Views:	772
Size:	3.7 KB
ID:	132017  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #16  
Old 03 Feb 2012, 08:04
tommyxv tommyxv is offline
 
Join Date: Feb 2005
I just did this on a new v4.1.10 install and it is still working for me. Are you still have problems?
Reply With Quote
  #17  
Old 27 Mar 2012, 09:49
4ibon4ik 4ibon4ik is offline
 
Join Date: Jan 2009
4.1.11 my working vbcms_content_section_page template


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #18  
Old 10 May 2012, 11:21
Savraj Savraj is offline
 
Join Date: Jan 2012
Hi someone tell me how to find the vbcms_content_section_page template...please
Reply With Quote
  #19  
Old 21 Jan 2013, 11:31
Sherrie Sherrie is offline
 
Join Date: Nov 2005
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.
Reply With Quote
  #20  
Old 23 Jan 2013, 17:17
tommyxv tommyxv is offline
 
Join Date: Feb 2005
Originally Posted by Sherrie View Post
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.
Yes, you can still use this for 4.2.x
__________________
Reply With Quote
  #21  
Old 15 Aug 2013, 03:27
BattleBunker BattleBunker is offline
 
Join Date: Nov 2010
Slightly old topic now, but its the best thing (and most recent) I've found in hours of searching on how to remove the primary content from specific pages.


I had listed some questions a short time ago, but have managed to answer them both myself. Here are the questions I asked:


1 - can this be done in the reverse - ie: list the pages you do NOT want to show the PC on, rather then list the pages you want to KEEP the PC on ....
2 - is this "removing" the PC from the page, or 'cloaking' it ...
3 - this does not work when listing multiple pages using OR as per the original post (also posted by Jokorey and GamersChallenge, though they seemed to find another solution that suited their needs)


Here are my solutions to issue 1 and 3 - not being a programmer I am unsure if they are 'best practice' but the edits seem to work fine:


Issue 1
Reversing the method - list the pages you want to HIDE the content on, instead of listing the pages your want to SHOW the content on:

Simply change the 'connector' (or what ever it is called) to "not equal too", ie:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Issue 3

Listing additional pages using OR as per the original topic does not work, you need to list additional 'if' statements:

I have done the following (keeping in mind I am listing pages I DO NOT want the primary content displayed on):


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

As I have added an additional IF statement, I need to close/end that statement, so added an additional </vb:if> ... here is the full code for the first part:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Note my additional IF statement on the second line, and my additional </vb:if> on the last line


Given that I have now included multiple pages using IF statements, I need to include those pages further on too, the next section immediately after the 3 closing IF 'statements'. So now I have:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Again, given that I have include an additional IF statement here, I need to close it somewhere ... I simple closed it at the very end by adding an additional </vb:if> as the very last line in the entire code.

Long post, sorry - trying to be as descriptive as possible

Here is my entire code, that now hides the Primary Content on the pages I list, and allows me to hide that content on (in this case) 2 pages ... News and Food:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.



What still remains though, is the Issue 2 - does this 'remove' the content, or 'cloak' it ...? I guess the question is, am I going to be dinged by search engines for cloaking content?

Last edited by BattleBunker; 15 Aug 2013 at 04:11.
Reply With Quote
  #22  
Old 16 Aug 2013, 00:33
BattleBunker BattleBunker is offline
 
Join Date: Nov 2010
Okay, after stumbling around for most of yesterday I have not been able to get this to work, either as suggested by the OP or by my edits above.

- Using OR does not work
- By including several IF statements that do NOT include the PC on various pages, I cannot turn it off on the main content.php page
- adding additional IF statements to only show it on specific pages does not work either

Off to find a different solution.

Cheers
Reply With Quote
  #23  
Old 30 Aug 2013, 05:09
tommyxv tommyxv is offline
 
Join Date: Feb 2005
Hi, I still have this working on one of my sites. What version vb are you running? I would not consider this cloaking. Using css to hide I feel is cloaking.
__________________
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 10:40.

Layout Options | Width: Wide Color: