Advanced Content default smarty value dropdown

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
mebots
Forum Members
Forum Members
Posts: 44
Joined: Sun May 23, 2010 10:22 pm

Advanced Content default smarty value dropdown

Post by mebots »

Hello,

Have made the following advanced content block:

Code: Select all

{content block="block_3" label="Sidebar menu" page_tab="Blokken" block_type="dropdown" sortable="true" items=":::get_gcb_list allowed_group='Admin':::" default="`$root_page_alias`_sidebar_menu" assign="block_3" smarty=true}
The items worked.

But the default value doesn't work.

$root_page_alias is for example "contact", why can't I make it like

"contact_sidebar_menu" as default?

Can I use smarty in default?

Martijn.
JohnnyB
Dev Team Member
Dev Team Member
Posts: 731
Joined: Tue Nov 21, 2006 5:05 pm

Re: Advanced Content default smarty value dropdown

Post by JohnnyB »

default="`$root_page_alias`_sidebar_menu"
With new Smarty ver 3 that the CMSMS versions 1.11++ use, you don't need the `` chars around the smarty stuff.

Also you will need to either capture the values you are trying to put together first and assign it as a var to put into the tag or try to use the |cat modifier to join them together.

http://www.smarty.net/docs/en/language. ... apture.tpl
http://www.smarty.net/docs/en/language.modifier.cat.tpl

Is $root_page_alias an actual var?
$page_alias is and usually I use the CGSimpleSmarty method of getting the parent or root of a page.
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Advanced Content default smarty value dropdown

Post by Rolf »

http://docs.cmsmadesimple.org/tags/core/content
default - Allows you to specify default content for this content block (additional content blocks only). You can't use a smarty string here!
So {content block="third_content_block" default=$foo} is NOT valid
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Post Reply

Return to “Modules/Add-Ons”