Page 1 of 1

Help adding custom fields

Posted: Sun Nov 18, 2007 5:40 pm
by lukebo
Hi everybody. This is my first post on this forum, although it's been a while since I'm lurking.
After comparing a few CMSs I definitely chose CMSMS... Now I'm trying to set up my first production site.
Everyting's going up whith no problems at all... except one thing.

On the site I'm creating each page contains a small "tags" box, containing a few tags to briefly identify what the page is talking about.
Tags are different on each page.

The most suitable way to handle that boxes in each pace would be having a custom field (maybe called "pagetags") inside the "EDIT CONTENT" page (where you can edit page titles, metatags, content, etc...).
Is there a way to add such a custom field?

I read several forum posts suggesting to use "global content blocks". But as far as I understood them, they are used to include custom textblocs recurring on all pages.

Thanks in advance to everybody!

luca
Italy

Re: Help adding custom fields

Posted: Sun Nov 18, 2007 5:43 pm
by calguy1000

Re: Help adding custom fields

Posted: Sun Nov 18, 2007 6:09 pm
by lukebo
Nice thanks! But... Where do I have to add the code?

Code: Select all

{content block='meta_description' wysiwyg='false' assign='meta_description'}
<meta name="description" content="{$meta_description|strip_tags|summarize:30:""}">
??
In a global content block or whithin the template itself?

And... above all: already tried to add other GCB to my template... But they neither appear on the frontend nor in the backend (where I'd like to be able to edit them for each page). I'm certainly doing something wrong...

TIA!

Re: Help adding custom fields

Posted: Sun Nov 18, 2007 6:56 pm
by calguy1000
In your page template...

Re: Help adding custom fields

Posted: Sun Nov 18, 2007 7:41 pm
by lukebo
calguy1000 wrote: In your page template...
Thanks, it works, but I'm not sure I got the difference between your implementation and a normal "global content block", which shows the same content for each time I include its tag.

What I'm looking for is a way to add new field in the backoffice interface of the "options" of every single page, in order to be able to add to my pages extra content apart from the default elements, placing that content wherever I like.

It would be nice to be able to create more than one custom field: say, one for "tags", one for a brief summary of the page content, one for links to be published on that page and so on.

Am I talking of something that can be done with cmsms?

Thanks for your patience!

luca

Re: Help adding custom fields

Posted: Sun Nov 18, 2007 8:00 pm
by lukebo
Answeriing to myself... GOT IT!

I didn't realize how global content block worked until I invoked  the custom block I created from the template with:

Code: Select all

{content block='mytags' wysiwyg='false' oneline='true'}
That enabled the custom menu within the content editing page... letting me do exactly what I wanted.

Sorry for bothering you... but I've been unable to find anything about GCB in the docs...

Ciao, luca.