Page 1 of 1

[SOLVED]making content blocks invisible

Posted: Tue Mar 10, 2009 10:21 am
by size
I have made a template that has many content blocks including places where you can paste code. the page is for a property discription

this template is the final page in a directory type application

I  want to add on this template some content blocks that will not be shown on the page but the data could be used to build an index to the final pages.

i.e I would like to add a short blurb, image and possible a dropdown on the EDIT CONTENT PAGE  is this possible and if so can someone lead me in the right direction

p.s I have looked at cataloger, cart, simple cart and products modules but the final  page have fields I don't need, I would really like to add data for each property on one page in the edit content area,

Re: making content blocks invisible

Posted: Tue Mar 10, 2009 1:01 pm
by aln_cms
Hi,

Could you wrap it in {content block="hidden"}

Alan

Re: making content blocks invisible

Posted: Tue Mar 10, 2009 4:11 pm
by nhaack
just place {content block="my_other_block" assign=var_blockname} into your template. This will hand the content from the block "my_other_block" to the variable "var_blockname". As a result, the block will not be shown at all on the final page (no need to hide with CSS).

For generating the overview, you can use the content_dump plug-in (just as an idea - check the wiki for a comprehensive overview of possibilities).

Best
Nils

Re: making content blocks invisible

Posted: Wed Mar 11, 2009 3:10 am
by size
thank you for both your inputs

the assign var looks like it works and will read the wiki on content_dump

**just to note I have found through pure accident that using html comment tags i.e also does what I want, shows the content block in the EDIT CONTENT PAGE  but does not show it on the website.

would there be any reason this wouldn't work technically? as it seems like it maybe something that hasn't been programmed

thanks

Re: making content blocks invisible

Posted: Wed Mar 11, 2009 8:10 am
by nhaack
Technically it works on a visible level. But if you comment out the block or hide it with CMS the text can still be seen in the source code. In the case of CSS, by search engines as well. Personally, I always go for assigning the data to a variable...

Re: making content blocks invisible

Posted: Wed Mar 11, 2009 10:27 am
by RonnyK
You can exclude contents from being rendered by putting them between {* ... *}

like
{* {content block="some-block"} *}
The block will show in the edit-content, but wont be in the source of the page. This makes it usable as a documentation-box for the page as well....

Ronny

Re: making content blocks invisible

Posted: Wed Mar 11, 2009 2:58 pm
by nhaack
Thanks Ronny! I guess {* ... *} is commenting syntax for smarty? Now as you mentioned it, I'm sure I've had the exact same discussion a month ago or so... will write this into my little booklet right away ;D

Best
Nils

Re: making content blocks invisible

Posted: Tue Mar 24, 2009 9:46 am
by size
hi again,

just to continue the conversation after playing around with the different ways suggested to make content invisible and then using the content_dump plug-in as suggested, great for what I am wanting to achieve and almost done!  ;D

is there any benefit in assigning a var to the content block over using smarty comment tags {*.......*}?

 

Re: making content blocks invisible

Posted: Tue Mar 24, 2009 9:36 pm
by Dr.CSS
Six of one half dozen of the other...