Page 4 of 18

Re: improve the content type "content"

Posted: Wed Jan 06, 2010 3:30 pm
by NaN
I believe bryan had something different in his mind ;)
But the wysiwyg param is already in there.

Code: Select all

{content2 block="SomeBlock" wysiwyg=false}
This code should show you a textarea with disabled wysiwyg Editor by default.
Or did i get the wrong end of stick?

Re: improve the content type "content"

Posted: Thu Jan 07, 2010 7:17 pm
by bryan
Wow, don't I feel like an idiot :P The wysiwyg param Works just fine. The "Disable WYSIWYG editor on this page" available in the Options tab doesn't work but you can just apply the wysiwyg="false" parameter in the template.

Re: improve the content type "content"

Posted: Thu Jan 07, 2010 8:55 pm
by NaN
Well using the wysiwyg param will disable the editor of all pages. But you cannot disable the editor only for one specific page.
I dunno why this in the options tab isn't working anymore. But you`re right this should be fixed. I need to have a look.

Re: improve the content type "content"

Posted: Thu Jan 14, 2010 1:15 am
by JeremyBASS
So I needed to have a select_multiple type to have a dynamic item list instead of the hardcoded list... ... manly I needed it from the news mod... so :D I made this process smarty...

this is how it works... Let say I wanted to store your item list in one place like a global content block... ( I wanted to pull it from news).. so this is what I have...


{content
block="test"
style="width:350px;font: 700 14px Arial, Helvetica, sans-serif;color: #333; float:left;'
type="dropdown"
oneline="true"
items=":::global_content name=test:::"
smartyOn="true"
}

so instead if the normal  {global_content name=test}  {} become ::: ::: so that would be  :::global_content name=test:::


So id I had in the GCB named test

color of money,sports,road and rides,oasis,travel,sun blog,seniors,style,politics,sun report,travel,stateside,week in review,health,diaspora,entertainment,inside philly,freedom quest,education,food and beverage,go with the flo


now I have


{content
block="test"
style="width:350px;font: 700 14px Arial, Helvetica, sans-serif;color: #333; float:left;'
type="dropdown"
oneline="true"
items=":::global_content name=test:::"
smartyOn="true"
}

in stead of

{content
block="test"
style="width:350px;font: 700 14px Arial, Helvetica, sans-serif;color: #333; float:left;'
type="dropdown"
oneline="true"
items="color of money,sports,road and rides,oasis,travel,sun blog,seniors,style,politics,sun report,travel,stateside,week in review,health,diaspora,entertainment,inside philly,freedom quest,education,food and beverage,go with the flo"
}


Which now opens me up to do tons of block for different things… and then can all share the one main item list… :D

Cheers
jeremy


edit !!!  just in case some one downloaded it, Content2.inc.php.txt
was off.. I have reuploaded the correct one.. cheers -J

Re: improve the content type "content"

Posted: Thu Jan 14, 2010 2:41 am
by JeremyBASS
So I thought I'd show more on how to use this...

With this..

Code: Select all

{content block_tab="Recent News"
block="Recent News"
label='<strong>Choose as many categories as you want to show</strong>'
style='height:200px;width:350px;font: 700 14px Arial, Helvetica, sans-serif;color: #333; float:left;'
assign=RecentNews
type="select_multiple"
items=":::news browsecattemplate=catLIST action=browsecat detailpage=home:::"
smartyOn="true"
}

so... items=":::news browsecattemplate=catLIST action=browsecat detailpage=home:::"

Would be the same as {news browsecattemplate=catLIST action=browsecat detailpage=home}

In the browsecattemplate catLIST I have

Code: Select all

{foreach from=$cats item=node name=foo}{$node.news_category_name}{if $smarty.foreach.foo.last}{else},{/if}{/foreach}


This creates the list for you as you add the cats to news... note: in this case you'll see I had to add the detailpage=home even thought there is no way to use this.. Why? Well the index detailpage does have a default of '' so I defined one.. Hope this help show the power...

Cheers
Jeremy

Filter the browsecat for the dropdowns...

Posted: Thu Jan 28, 2010 4:16 am
by robsta
JeremyBass - the use of news module works great!

I can now treat news and pages as one and my users can decide which is which and still catalog!

I have quite a few categories now and use the $node.hierarchy level to display only Children of Parent categories and then split em up using separate browsecat templates for each tab...

Code: Select all

{foreach from=$cats item=node name=foo}
{if $node.hierarchy > 9 && $node.hierarchy <10} 
{$node.news_category_name}{if $smarty.foreach.foo.last}{else},{/if}{/if}{/foreach}

Re: improve the content type "content"

Posted: Wed Feb 03, 2010 12:18 am
by luis.ferreira
Hi, good work everyone!
This should go the next version of cmsms.

Another thing, on using, I also replaced in admin\editcontent.php (line 83)
this
    $content_type = 'content';
by this
    $content_type = 'content2';

Finally... the style tag isn't working....have a look at a bit of my template. I was trying to keep the editor(user) away from meta tags....

Code: Select all

{content assign=keywords_content
block="Keywords"
oneline="true"
label="Keywords (palavras chave para esta página)"
style='width:350px;color:red'
 }

<meta name="keywords" content="{$keywords_content}"/>

No color red nor size 350px

I also tried

Code: Select all

style="width:350px;color:red"
with no success.

Re: improve the content type "content"

Posted: Wed Feb 03, 2010 2:58 am
by JeremyBASS
luis.ferreira wrote: Hi, good work everyone!
This should go the next version of cmsms.

Another thing, on using, I also replaced in admin\editcontent.php (line 83)
this
     $content_type = 'content';
by this
     $content_type = 'content2';

Finally... the style tag isn't working....have a look at a bit of my template. I was trying to keep the editor(user) away from meta tags....

Code: Select all

{content assign=keywords_content
block="Keywords"
oneline="true"
label="Keywords (palavras chave para esta página)"
style='width:350px;color:red'
 }

<meta name="keywords" content="{$keywords_content}"/>

No color red nor size 350px

I also tried

Code: Select all

style="width:350px;color:red"
with no success.
hmm now that I think about it I may have not added the style to the oneline... I'll take a look later... -J

Re: improve the content type "content"

Posted: Wed Feb 03, 2010 10:39 pm
by luis.ferreira
Thank you for the quick response!

I tried changing to:

Code: Select all

{content assign=keywords_content
wysiwyg="false"
block="Keywords"
label="Keywords (palavras chave para esta página)"
style="color:red;height:60px"
 }
... and still no color red or height 60px.

I must be doing something realy silly, but I just can't see what. The label appears allright.

-----
Just to get things going... I found that using the last piece of code, cmsms generates a textarea with the ID "Keywords". From there, I went to the admin\styles\NCleanGray\css\style.css and there added the style:

Code: Select all

#Keywords{color:red}
and it worked!
I know I'm making this dependent on the theme, but for the time being that is not crucial.
I also agree this is not a solution, just a workaround, so any help is still very wellcome.

Re: improve the content type "content"

Posted: Wed Feb 03, 2010 11:05 pm
by JeremyBASS
oh i see.. ... It looks like I only added it to a few of them.. here was the test...


{content
block="test"
block_tab="something"
style="width:350px;font: 700 14px Arial, Helvetica, sans-serif;color: #333; float:left;'
type="dropdown"
items=":::global_content name=test:::"
smartyOn="true"
<<<worked
{content assign=keywords_content
wysiwyg="false"
block="Keywords"
label="Keywords (palavras chave para esta página)"
style="color:red;height:60px"
<<<didn't
{content
block="test2"
block_tab="something"
style="width:350px;font: 700 14px Arial, Helvetica, sans-serif;color: #333; float:left;'
type="text"
oneline="true"

<<<worked


I guess that it needs to be added in more places... gosh I need more time in the day lol... next go around I'll be sure to add if NaN don't do it...

Cheers
Jeremy

Re: improve the content type "content"

Posted: Wed Feb 10, 2010 5:05 pm
by rlparker25
Hi,

I used JeremyBASS's version to add dynamic select boxes in the pages admin area and that worked perfectly. However now non of the content shows on my pages in the front end where the {content} tag is!

any ideas why my text has all disappeared?

I upgraded the site to 1.6.6 and everything else seems to work just not my content :(

thanks

rachael

Re: improve the content type "content"

Posted: Wed Feb 10, 2010 6:05 pm
by JeremyBASS
did you try {content2}  ??  That may fix it.. I don't and all is fine but it seems some has to use it.  Cheers Jeremy

Re: improve the content type "content"

Posted: Mon Feb 15, 2010 6:59 pm
by NikNak
Hi guys

Would be useful if the directory of a dropdown image selector or Image Picker could be selected from a varaible, like the page alias.

I tried to copy the syntax used elsewhere like items=":::global_content name=test:::":
{content type='image' ImgMode='ImgPicker' block='OrganizeImages' dir=:::title::: label='Organize Images'}
{content type='image' ImgMode='ImgPicker' block='OrganizeImages' dir=:::$title::: label='Organize Images'}
{content type='image' ImgMode='ImgPicker' block='OrganizeImages' dir=":::$title:::" label='Organize Images'}

But I guess that only works for the dropdown content type, at the moment.

Thanks

nik

Re: improve the content type "content"

Posted: Mon Feb 15, 2010 7:28 pm
by JeremyBASS
Looks like this needs some good loving.. I'm booked up atm but if NaN doesn't get to it, I'll put some time in it.. I wanted to add an infinite block where you can keep added more block from within the page edit area so it'd be an array bock to which you could use to make tabs, accordions, sliders, or what have you.. :D -J

Re: improve the content type "content"

Posted: Mon Feb 15, 2010 11:43 pm
by NaN
JeremyBASS wrote: Looks like this needs some good loving.. I'm booked up atm but if NaN doesn't get to it, I'll put some time in it.. I wanted to add an infinite block where you can keep added more block from within the page edit area so it'd be an array bock to which you could use to make tabs, accordions, sliders, or what have you.. :D -J
:D Funny I thought the same.
I wonder if it would be better to create a module with an own contenttype (like album or older news versions).
So you can set your fields in an adminpanel and link them to pages individually without editing the template all the time.
You could also setup if the fields will be printed out in frontend or only be assigned to a smarty variable.
Userspecific permissions to use the fields.
etc.

If i know how to realise this i will register a project.
Don't like to register something now without knowing how to realise it.
There are enough projects without any file release ;)