[SOLVED] Documentation and how to add new content boxes?
Posted: Sun Mar 23, 2014 11:25 pm
I looked everywhere, but I can't really find any documentation, would be awesome if there was a little documentation about this:
In the index.php file, I found all the variables and figured I could simply do this:
Add PHP:
Add HTML/PHP
Is this the correct way? Is there a more effective way to do this?
For example doing like this:
And when adding content on the website, I could create and load new and separate files like this(using only one variable);
Actually, doing it like this DOES create a new file called "testbox" (3 different files)
But WonderCMS do not actually load the each separate file, instead, it loads the "textbox" file only, which means every input have the same content.
Also, doing like this actually bugs out the WYSIWYG editor 0.1 [BETA], which is kinda sad.
Another problem is that this same content do appear on all pages, so is there a way to create page-specific content?
Tell me if i'm doing this right, or if there is a more correct way to do this. Thanks!
In the index.php file, I found all the variables and figured I could simply do this:
Add PHP:
Code: Select all
$c['testbox1'] = 'This is a textbox';
$c['testbox2'] = 'This is a textbox';
$c['testbox3'] = 'This is a textbox';
Code: Select all
<div class="col-33">
<?php content('testbox1', $c['testbox1']); ?>
</div>
<div class="col-33">
<?php content('testbox2', $c['testbox2']); ?>
</div>
<div class="col-33">
<?php content('testbox3', $c['testbox3']); ?>
</div>
For example doing like this:
Code: Select all
$c['testbox'] = 'This is a textbox';
Code: Select all
<div class="col-33">
<?php content('testbox1', $c['testbox']); ?>
<?php content('testbox2', $c['testbox']); ?>
<?php content('testbox3', $c['testbox']); ?>
</div>
But WonderCMS do not actually load the each separate file, instead, it loads the "textbox" file only, which means every input have the same content.
Also, doing like this actually bugs out the WYSIWYG editor 0.1 [BETA], which is kinda sad.
Another problem is that this same content do appear on all pages, so is there a way to create page-specific content?
Tell me if i'm doing this right, or if there is a more correct way to do this. Thanks!