Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
2 editable content box on every page
#1
Hello
I'm wondering if there is a method (even nightmare one), of creating and editing pages, where content should be inserted to 2 independent containers.

simple example of layout:
____________________
| header |
--------------------------------
| content 1 | content 2 |
--------------------------------
| footer |
--------------------------------

I know about components, and found Mike's solution (http://get-simple.info/forum/viewtopic.php?id=177)
But both methods rely on creating manually a new theme file for every new page. And such solutions are unacceptable when pages are going to be created/deleted frequently.

What I'd like to achieve is for example having 2 ckeditor windows when editing existing or adding a new page. Any other solution, based on 1 theme.php file would be good.


ps. I'm not talking about creating a table, and split the content between table cells Wink
Addons: blue business theme, Online Visitors, Notepad
Reply
#2
You could add another field, CKEditor field even, to the editing page. But you’ll have to go in and change the core files as currently you can only put thing below the extra options using plugins. What you’re going to want to do is this:
  • Add a copy of the content editor below the current editing field,
  • make sure the back-end writes this new field to the page’s XML-file,
  • add a function to the core that enables you to output the data in your theme,
  • make the page editor read this data so it can show the previous entered data when editing.
Points 2 and 3 can be done with a plugin, points 1 and 4 will have to be done straight in /admin/edit.php.

Depending on how much PHP you know it wouldn’t be too hard and of course you can always ask for help.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#3
When I read your replies, everything sounds so simple Smile
Unfortunately I'm not a webdeveloper. I'm able to shape (stylize) already existing php code to some extent, or create a simple chunk of code, but my programming "skills" are too low to create a stand alone plugin. Thus your solution is too complicated for me to implement it on my own.

But I think I might found a simpler way around.
Having 2 content sections would have to base on Mike's idea.
But instead of creating additional template files for every page, I could create a private subpage for every page, include it in template.php using
Code:
<?php get_content('$variable'); ?>
where $variable would be the subpage's name, and load the subpage into 2nd content section, using conditional statements dependent on
Code:
<?php get_page_slug(); ?>

As I think of it now, it may turn out as a simplified Mike's method, requiring manual changes inside template.php :/
Of course I could use a component to modify the template.php in cms, but it won't be a fully automated solution.


edit: I'm terribly sorry for my engrish. I haven't sleep well for last 2 days.
Addons: blue business theme, Online Visitors, Notepad
Reply
#4
Yes, that idea might work… You could use Mike’s CustomFields plugin to define what page should be outputted in your second content field. That way you don’t have to go change the template files at all after setting it up correctly.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#5
Zegnåt Wrote:Yes, that idea might work… You could use Mike’s CustomFields plugin to define what page should be outputted in your second content field. That way you don’t have to go change the template files at all after setting it up correctly.

As I get more involved into getsimple I see my mistakes.
not get_page_slug(); , but return_page_slug();
And editing template sourcecode through components isn't possible Wink
It wouldn't have much sense anyway.

Thank you for giving a hint about Mike's plugin. Haven't tried it yet, but I hope it's the solution to the problem I have encountered.

btw. I've looked at quite much cms-es, and I can't say any of them offered the option to edit multiple content sections. Might sound like a simple things, but it's a real nail in the *** Wink
Addons: blue business theme, Online Visitors, Notepad
Reply




Users browsing this thread: 1 Guest(s)