Jump to content
Sign in to follow this  
ksnyde

HELP: I touched the "Content" section

Recommended Posts

ksnyde

I wanted to create an "alternative content" section. It would basically be a full copy of the section but then I'd add one additional hook into it. That was the idea but things have gone horribly wrong. What I did: 1. Copied the files in the "content" directory under sections 2. Copied it to my child theme's sections folder under the name "altcontent" 3. modified the Section.PHP file's header to indicate this was the "Alternate Content" not "Content" section 4. Went into the PageLines->Settings->Templates 5. Noticed that ... oops all my templates which had had a content section now had my alternate content section in it's place. Why? Because I forgot to rename the class and therefore accidentally I was overriding the base theme's content section. 6. Being the smart guy I am I thought ... no problem I can fix that and I changed the class name to AlternateContent:

/*
		Section: Alternate Content
		Author: PageLines (modified by Ken Snyder)
		Author URI: http://www.pagelines.com
		Description: Main site content area. Holds sidebars, page content, etc.. (KS) I have adjusted it make it behave well with Views plugin.
		Class Name: PageLinesContent
		Workswith: templates
		Cloning: false
		Failswith: 404
	*/
	
	/**
	 * Alternate Content Section
	 *
	 * @package PageLines Framework
	 * @author Ken Snyder
	 */
	class AlternateContent extends PageLinesSection {

7. For some reason now I no longer have either Content or Alternate Content as options and as you might imagine my pages look quite drab without content. 8. I did notice that if I switch back to the base theme it does have the Content section but going back again to my child theme seems have some residual memory of the terrible thing I did and does not self correct. PLEASE HELP!

Share this post


Link to post
Share on other sites
Simon
Click Refresh Store button to rebuild the sections cache

Share this post


Link to post
Share on other sites
ksnyde
i tried that but it didn't work. :^(

Share this post


Link to post
Share on other sites
catrina
You can try re-installing fresh copies of the files you accidentally overwrote (from a fresh download of the theme from your PageLines Framework).

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
ksnyde
Simon and Catrina, thanks for helping through my self-inflicted hell. I did find a way out of it ... I removed the new AlternateContent class that i'd created. It had already been "deactivated" but apparently that wasn't enough. Ahh well. Sad that my first experience with sections was such a nail biter. I'll make sure I take on a less ambitious goal next time.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×