Topic Closed
tyee
24 Posts

I added a javascript slideshow to my sidebar and it works fine however  the instructions that came with it stated for it to work you must add this,  which I did to my template

<div id="slideshow"></div>

The show plays fine but it plays on everypage. I only want it on the main page so......I tried moving the above div to the sidebar content under the javascript and when I save, this div is erased by, I believe HTML Tidy. Is there a way to keep the div in the sidebar and not have it erased?  Isn't that div just html which shouldn't get erased?

Thanks

9 years ago#334

Not sure why you are adding it to your template ... if you put it on your template, it will show on every page (unless you have some sort of strange IF structure in your template that says if this is the main page, insert this line; if it isn't the main page, just do the rest of the page normally.

If you only want something on the main page, you basically have four choices that I can see so far:

a. Separate template (identical to other one, except it has this extra line in it);

b. Same template but you add above IF structure;

c. You create a special output (perhaps called SideBar2) that only appears on main page (either through a or b above); or,

d. You embed it in the actual "page" you create.

Good luck...

PolyWogg

9 years ago#336

tyee
24 Posts

Hi Polywogg

 Thanks for the tips. Is there some tutorial on IFs that you could point me to? Sounds interesting,never heard of that before.

Regarding method 4, how could I embed the div into the actual page? Do you mean "editing" the page like normal, switching to "source" view, then pasting it in? I will try it but HTML tidy might erase it again. I'll let you know.

Thanks

9 years ago#338

tyee
24 Posts

You said -

If you only want something on the main page, you basically have four choices that I can see so far:

a. Separate template (identical to other one, except it has this extra line in it);

b. Same template but you add above IF structure;

c. You create a special output (perhaps called SideBar2) that only appears on main page (either through a or b above); or,

d. You embed it in the actual "page" you create.

 

Well if I have to use another template I will.

Basically I want to know why "<div id="fadeshow1"></div>" is deleted from my sidebar. If I can turn off HTML Tidy (assuming that's what is deleting it) then everything is solved!!

Edit - Well no it isn't solved. Brain stopped working. I guess we all need a way to select on which page any "Extra Content' goes to (in the Admin). That would solve it along with turning HTML Tidy off.

Edited: 9 years ago#339

syndicatefx
42 Posts
52.4K Downloads
6 Themes

Hi There,

There is a quick way around your specific issue, but of course a php IF statement structure would be more robust..maybe?

If you are comfortable with css here's a quick way to get it done, i've used it on my homepage, and you CAN paste your html directly in the CKeditor in 'source' mode, it doesn't erase your div's.

Inside your theme folder, in your template.php create another gpOutput::Get('Extra','sideMenu'); and wrap it in a div with a class name of your choice like for ex: class="mypics"

Now in your default style.css (if you're using one style for the whole site) you add the class 'mypics'  like this:

.mypics{
display:none;
}

this will insure that this block will be invisible through out all of the pages, and to make it visible only on the homepage you create another 'color' folder inside your theme folder (called for ex:Homepage) and create a stylesheet for this 'color'.

Inside the homepage/style.css, you import all the styles of the main stylesheet like this @import url("../default/style.css"); so you dont have to copy paste all the same styles over again, and, just add the line

.mypics{
display:block;
}

Now in the admin area go to FILE MANAGER hover over your home page and in the dropdown menu select theme, choose 'Homepage' and you're done.

In your homepage edit that block and copy/paste your slideshow structure into it, easy!!

Hope this helps :-)

cheers,

Jimmy

9 years ago#340

Phil Smith
18 Posts
4.9K Downloads
1 Themes

Your CSS method will work asthetically, but it's not a real solution when it comes to search engine optimization.  Search engines will still be reading the extra content on every page which will make it harder for you to optimize for something.

The CMS needs to have a method for managing extra content on a per-page basis built into its core functionality.  Maybe the only trick for Josh is to find a way to do this in an "easy" way?

Based on my own experience, Website Baker does this type of thing pretty well (their equivalent to extra content would be a "block").

9 years ago#342

tyee
24 Posts

Yes, I agree. I've been using Get Simple CMS lately too but I like gpEasy better. A tip from GS would be how they do this although I'm not an expert on GS.

From what I remember they just add the page name to an output function, so using a generic gpEasy output function like this --

gpOutput::Get('Extra',[area]);

gpEasy could make it like this to tell which page to place the Extra Content  --

gpOutput::Get('Extra',PageName[area]);

Do you think this would work?

 

9 years ago#343

Phil Smith
18 Posts
4.9K Downloads
1 Themes

I think that would work but it wouldn't be easy enough to line up with the CMS philosophy.

This would be more work for the developers, but I would like to see something built in to the File Manager in gpEasy. For example, you would hover over a page name and within the popup you would see:

  • View File
  • Rename
  • Extra Content
  • ...

So you would open up the File Manager, hover over a page, select Extra content and then drag in extra content items for that page specifically.

I'm actually wondering if that wouldn't be very difficult to implement?

Josh, are you still out there to comment on this?

Edited: 9 years ago#344

tyee
24 Posts

Yes, that sounds like an awesome way to do it!

Josh, please take a look!!

9 years ago#348

Josh S.
2K Posts
266K Downloads
16 Themes
18 Plugins

Sorry I've been away...

For the original question, I found that it is actually the WYSIWYG Editor (CKEditor) that is stripping the empty <div> from the content.

A simple fix for this would be to add the config.ignoreEmptyParagraph = false; line to the /include/jsckeditor_config.js file. I will add it to gpEasy so future releases won't have the same problem.

I really like the conversation about Page Specific Extra Content too. I have been hesitant to get into it because it adds a level of complexity for the user (great for knowledgeable user, but it has the potential to add confusion). The trick is a matter of finding an easy and intuitive solution that won't confuse new users.

My hesitation with implementing this feature from the "File Manager" is the user wouldn't have visual context of what they are editing. The results of hiding/showing an extra area on a page wouldn't be seen untill the user leaves the "File Manager".

An extra content manager would probably need to handle a number of things too: showing, hiding, adding and arranging content areas. This is all quite similar to the "Arrange Content" script (See "Editable Area" drop down) that gpEasy currently has. Maybe this new functionality could be an off-shoot or enhancment of that code. Do you all find the "Arrange Content" functionality to be easy to use and intuitive?

9 years ago#353

Phil Smith
18 Posts
4.9K Downloads
1 Themes

Not sure why I didn't think through using the Arrange Content area before. That does seem like a better solution.

So you would first create a new page in File Manager, and then after navigating to your new page, use the Arrange Content tool to place Extra Content on a per-page basis.

That would be a great solution.. How fast can you get it done??? :)

9 years ago#367

tyee
24 Posts

Yes, sounds good, I second the motion!!

9 years ago#376

Josh S.
2K Posts
266K Downloads
16 Themes
18 Plugins

I like it. I think the theme/content_arrangment/file_manager could all be worked on a bit and made simpler. I'm currently working on an auto-updater for gpEasy, then I'll work on this.

9 years ago#379

Phil Smith
18 Posts
4.9K Downloads
1 Themes

Do you have room for more developers/contributors?

I think this is something I could contribute to.

9 years ago#380

Josh S.
2K Posts
266K Downloads
16 Themes
18 Plugins

There is definitely room for more help. Let's chat a little to see what we can get going.

9 years ago#384

Topic Closed

 

News

Typesetter 5.1
8/12/2017

Typesetter 5.0.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

Over 8 Times Faster Than Wordpress
5/3/2016

We've known for a long time that Typesetter is fast. It's something we take pride ... Read More

More News

creisi productions

Dienstleistungen von creisi productions, Luzern (Schweiz): * Konzeption, Planung und Erstellung Ihres Internet-Auftritts * Betreuung und Aktualisierung/Pflege Ihrer Website * ...

Find out more about our Provider Spotlight

Log In

  Register