Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Plugin Request: Page Templates
#7
Angryboy Wrote:Perhaps DynPages?

You can define the piece of markup that you want to be editable as a component. Then you place identifiers that say where the content is editable. So for example, with your one for columns you would make two components: column and column-end:

column
Code:
<?php global $args; ?>
  <div style="float: <?php echo $args[0]; ?>; width: <?php echo $args[1]; ?>;">
column-end
Code:
</div>

Then on your page you would simply use the following content to call the whole column:

Code:
{% column 'FLOAT', 'WIDTH' %} COLUMN CONTENT {% column-end %}

Changing 'FLOAT' to the direction of alignment, 'WIDTH' to the width of the column and 'COLUMN CONTENT' to whatever content you want.

Basically, form your markup in a component with the code <?php global $args; ?> at the beginning of your component, then for every part of it that you want to be editable, use <?php echo $args[#]; ?>, numbering the arg accordingly starting from 0. When you use the placeholders on the page, you simply use the format { componentname 'arg0' 'arg1' etc... }. The markup can be as complicated as you need it to be.

right on AngryBoy! - that's pretty much what i arrived at over the last 40 minutes..

Code:
<?php global $args; ?>
<div class="<?php echo $args[0]; ?> <?php echo $args[1]; ?>">

and the css has all of the column definitions..

it's working great - all the columns on this page are done like that:
http://dev.propellant23.com/gs31b/index....s-a-tables

and my editor has this:
Heading 1

Code:
{% columns one-half %}

ANam laoreet rutrum ligula, at tincidunt ligula sagittis semper. Integer congue vehicula lectus eu faucibus. Maecenas ante lectus, placerat et venenatis quis, dictum quis orci. Curabitur lacus nisi, vestibulum id aliquam sit amet, dictum sit amet lacus.

{% end-column %}

{% columns one-half last %}

BNam laoreet rutrum ligula, at tincidunt ligula sagittis semper. Integer congue vehicula lectus eu faucibus. Maecenas ante lectus, placerat et venenatis quis, dictum quis orci. Curabitur lacus nisi, vestibulum id aliquam sit amet, dictum sit amet lacus.

{% end-last-column %}
Reply


Messages In This Thread
Plugin Request: Page Templates - by alienee2 - 2012-04-19, 03:05:43
Plugin Request: Page Templates - by Angryboy - 2012-04-19, 03:22:42
Plugin Request: Page Templates - by alienee2 - 2012-04-19, 03:39:32
Plugin Request: Page Templates - by n00dles101 - 2012-04-19, 06:13:50
Plugin Request: Page Templates - by Angryboy - 2012-04-19, 06:26:54
Plugin Request: Page Templates - by Carlos - 2012-04-19, 06:35:14
Plugin Request: Page Templates - by alienee2 - 2012-04-19, 06:50:40
Plugin Request: Page Templates - by alienee2 - 2012-04-19, 06:53:43
Plugin Request: Page Templates - by alienee2 - 2012-04-19, 06:55:08
Plugin Request: Page Templates - by Angryboy - 2012-04-19, 07:14:02
Plugin Request: Page Templates - by n00dles101 - 2012-04-19, 07:21:06
Plugin Request: Page Templates - by alienee2 - 2012-04-19, 11:47:13
Plugin Request: Page Templates - by alienee2 - 2012-04-19, 12:02:09
Plugin Request: Page Templates - by alienee2 - 2012-05-13, 04:27:44
Plugin Request: Page Templates - by n00dles101 - 2012-05-13, 07:05:32



Users browsing this thread: 1 Guest(s)