Help adding custom fields

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
lukebo
New Member
New Member
Posts: 5
Joined: Sun Nov 18, 2007 5:30 pm

Help adding custom fields

Post 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
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Help adding custom fields

Post by calguy1000 »

Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
lukebo
New Member
New Member
Posts: 5
Joined: Sun Nov 18, 2007 5:30 pm

Re: Help adding custom fields

Post 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!
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Help adding custom fields

Post by calguy1000 »

In your page template...
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
lukebo
New Member
New Member
Posts: 5
Joined: Sun Nov 18, 2007 5:30 pm

Re: Help adding custom fields

Post 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
lukebo
New Member
New Member
Posts: 5
Joined: Sun Nov 18, 2007 5:30 pm

Re: Help adding custom fields

Post 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.
Post Reply

Return to “CMSMS Core”