Page 1 of 1

Documentation Content > Pages

Posted: Mon Dec 15, 2008 4:36 pm
by jvdoorn
Where can i find documentation on some fields in the page-edit section in admin:

What are these fields for?
How can i use them (in a template)?

Content > Pages > Main Tab
- Image
- Thumbnail

Content > Pages > Options Tab
- Extra Page Attribute 1:
- Extra Page Attribute 2:
- Extra Page Attribute 3:

- Smarty data or logic that is specific to this page

Re: Documentation Content > Pages

Posted: Fri Dec 19, 2008 9:32 pm
by kendo451
These values are contained in the content object {$content_obj}

To see them all try this:

{$content_obj|print_r}

Problem for me is, I can't figure out how to access most of those variables in there.  But it's something like {$content_obj->mProperty->image}.  I just can't get the syntax right.

Re: Documentation Content > Pages

Posted: Mon Dec 29, 2008 5:09 pm
by iancomtek
I figured it at last!

{$content_obj->mProperties->mPropertyValues.extra1}


This helped: http://www.smarty.net/manual/en/languag ... iables.php

Re: Documentation Content > Pages

Posted: Wed Dec 31, 2008 1:37 am
by kendo451
I've learned that there are some new tags to access these properties:

Help for the content_image tagHelp Help (new window)
What does this do?

This plugin allows template designers to prompt users to select an image file when editing the content of a page. It behaves similarly to the content plugin, for additional content blocks.
How do I use it?

Just insert the tag into your page template like: {content_image block='image1'}.
What parameters does it take?

    * (required) block - The name for this additional content block.

      Example:

      {content_image block='image1'}


    * (optional) label - A label or prompt for this content block in the edit content page. If not specified, the block name will be used.
    * (optional) dir - The name of a directory (relative to the uploads directory, from which to select image files. If not specified, the uploads directory will be used.

      Example: use images from the uploads/image directory.

      {content_image block='image1' dir='images'}


    * (optional) class - The css class name to use on the img tag in frontend display.
    * (optional) id - The id name to use on the img tag in frontend display.
    * (optional) name - The tag name to use on the img tag in frontend display.
    * (optional) width - The desired width of the image.
    * (optional) height - The desired height of the image.
    * (optional) alt - Alternative text if the image cannot be found.