template using JS expanding and contracting content
template using JS expanding and contracting content
I'm trying to build a new template and page using my webpage already designed. This page is an advice column for a client which he wishes to update himself. I have used a javascript so that the Question heading is clicked on and the Response is then expanded. I have numerous Q & Rs on the page.
I want to build the template so it works exactly the way it does now but I am having problems with the {content} blocks and where to put them. It just isn't working and I've been at it for hours. Here is some of the code, I don't know if you need to see the Javascript part in the head. This is a link to my page http://www.zendog.ca/columns_expand.html and the code below Please help.
Contract All | Expand All
Beginners Mind
Q: I am a young Saalish man who participates fully in the customs of my people as they are being taught by our elders in accord with our ancient traditions. These ceremonies and songs are meditation add something in my attempts to reach back to the source of my peoples' wisdom?
R: An interrupted lineage functions something like a severed spinal cord. Corporate entities which establish complex customs, myth and religious mechanisms communicate essential and subtle wisdom and knowledge. When these cultural artifacts cease, the mere forms may not be enough to transmit the most subtle knowledge. In the human body we find that the nerve tissue of the spinal cord does not regenerate easily once severed. Similarly, when cultural or religious lineages are severed they are often difficult to mend.
Something Missing
Q:
I am a 48 year old housewife. I love my husband and our two children, who
are now living on their own and both doing well. I know my husband loves me
What else do I need to do to become happy?
R: You have done everything human society prescribes to be happy. Despite having been born into 'good family' and being fortunate in love and health, there remains something missing. How can it be that deep happiness is so elusive? It is not supposed to work out that way; happiness is supposed to be our birthright, contingent only upon our assimilating and internalizing a critical mass of expedient means and conventional ideas. In our world this whole normative edifice
I appreciate your time
I want to build the template so it works exactly the way it does now but I am having problems with the {content} blocks and where to put them. It just isn't working and I've been at it for hours. Here is some of the code, I don't know if you need to see the Javascript part in the head. This is a link to my page http://www.zendog.ca/columns_expand.html and the code below Please help.
Contract All | Expand All
Beginners Mind
Q: I am a young Saalish man who participates fully in the customs of my people as they are being taught by our elders in accord with our ancient traditions. These ceremonies and songs are meditation add something in my attempts to reach back to the source of my peoples' wisdom?
R: An interrupted lineage functions something like a severed spinal cord. Corporate entities which establish complex customs, myth and religious mechanisms communicate essential and subtle wisdom and knowledge. When these cultural artifacts cease, the mere forms may not be enough to transmit the most subtle knowledge. In the human body we find that the nerve tissue of the spinal cord does not regenerate easily once severed. Similarly, when cultural or religious lineages are severed they are often difficult to mend.
Something Missing
Q:
I am a 48 year old housewife. I love my husband and our two children, who
are now living on their own and both doing well. I know my husband loves me
What else do I need to do to become happy?
R: You have done everything human society prescribes to be happy. Despite having been born into 'good family' and being fortunate in love and health, there remains something missing. How can it be that deep happiness is so elusive? It is not supposed to work out that way; happiness is supposed to be our birthright, contingent only upon our assimilating and internalizing a critical mass of expedient means and conventional ideas. In our world this whole normative edifice
I appreciate your time
Re: template using JS expanding and contracting content
Look also in Tag/plugin for startExpandCollapse and in forge for startExpandTracy wrote: I'm trying to build a new template and page using my webpage already designed. This page is an advice column for a client which he wishes to update himself. I have used a javascript so that the Question heading is clicked on and the Response is then expanded. I have numerous Q & Rs on the page.
Alby
Re: template using JS expanding and contracting content
Thanks for the reply, I found the pluggin and downloaded. Although I was guessing how. I downloaded the zip into my clients folder on my computer and then unzipped it into the plugins folder withing the cmsmadesimple folder. Is this correct? Then I uploaded it with my ftp to the plugins folder there. Is this correct? Now I haven't got a clue what to do now! 

Re: template using JS expanding and contracting content
Always try and test before on your local computer.Tracy wrote: Thanks for the reply, I found the pluggin and downloaded. Although I was guessing how. I downloaded the zip into my clients folder on my computer and then unzipped it into the plugins folder withing the cmsmadesimple folder. Is this correct? Then I uploaded it with my ftp to the plugins folder there. Is this correct? Now I haven't got a clue what to do now!![]()
Yes, it's correct, for use read Help in Extensions -> Plugins
Alby
Re: template using JS expanding and contracting content
I was under the impression that the plugin came with the default install, it's used in the comments module, in fact I just looked and they both come with it...
Look in the extensions > tags section of the admin...
Look in the extensions > tags section of the admin...
Re: template using JS expanding and contracting content
So, sorry for being such a beginer :-\er but, if it comes with this plugin then the page I already built using javascript??? Does the plugin just help the JS work or what happens.
I don't understand.
I don't understand.
Re: template using JS expanding and contracting content
???Ok, now I'm confused. I've read my replies here and found the {startExpandCollapse} {stopExpandCollapse} as mentioned. Redid my template only using this and have removed my Javascript source. It is working fine but my question now is in making the template so that the client can add his own Questions, Responses and Titles. Using the {startExpandCollapse} {stopExpandCollapse} each expanding heading that is clicked needs to be given a unique "id" and "title" so how do I put this in the template?? Maybe I'm not building the templates correctly. I want to leave the Q & Rs he has to date and add additional ones in the future.
Re: template using JS expanding and contracting content
My mistake, I don't read all reply.Tracy wrote: ???Ok, now I'm confused. I've read my replies here and found the {startExpandCollapse} {stopExpandCollapse} as mentioned. Redid my template only using this and have removed my Javascript source. It is working fine but my question now is in making the template so that the client can add his own Questions, Responses and Titles. Using the {startExpandCollapse} {stopExpandCollapse} each expanding heading that is clicked needs to be given a unique "id" and "title" so how do I put this in the template?? Maybe I'm not building the templates correctly. I want to leave the Q & Rs he has to date and add additional ones in the future.
My advice is to put the code in content of the page and not in the template.
Your client edit this content page and not template and insert text and code:
{startExpandCollapse id="QR1" title="YYYY"}
.......................
{stopExpandCollapse}
{startExpandCollapse id="QR2" title="YYYY"}
.......................
{stopExpandCollapse}
Alby
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: template using JS expanding and contracting content
Why not use the questions module or the glossary module for this Q/A thing.... rather than trying to shoehorn something into the content areas of a page.
It'd be alot easier with the questions or glossary module to modify the particular summary templates to do startexpandcollaps, endexpandcollapse with the particular record id
It'd be alot easier with the questions or glossary module to modify the particular summary templates to do startexpandcollaps, endexpandcollapse with the particular record id
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.
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.
Re: template using JS expanding and contracting content
So will I do anything to the template?
And everytime the client wants to add his new Q & R then he has to actually type in
{startExpandCollapse id="QR1" title="YYYY"}
{stopExpandCollapse}
changing the "id" and the "title" each time? Does it matter if the WYSIWYG is turned on or off?
And everytime the client wants to add his new Q & R then he has to actually type in
{startExpandCollapse id="QR1" title="YYYY"}
{stopExpandCollapse}
changing the "id" and the "title" each time? Does it matter if the WYSIWYG is turned on or off?
Re: template using JS expanding and contracting content
Yes, not in template (your client should not edit the template) but in page content (add Question text and surround Response text with 2 tags and edit "id" and "title")Tracy wrote: So will I do anything to the template?
And everytime the client wants to add his new Q & R then he has to actually type in
{startExpandCollapse id="QR1" title="YYYY"}
{stopExpandCollapse}
changing the "id" and the "title" each time? Does it matter if the WYSIWYG is turned on or off?
Sometimes with WYSIWYG editor can have problems for { }
If your client does not have a minimum of informatic skill, follow the advice of calguy1000, I have not tried (questions module or the glossary module) but probably will have fewer problems in the long term
Alby
Re: template using JS expanding and contracting content
Regarding the suggested Questions Module;
I have tried to implement the {startExpandCollapse}{stopExpandCollapse} and although I can make it work I don't think it is the answer that I am looking for, I think the client may have problems writing the content in.
Can you explain to me how the Questions Module works? It is fairly vague in the Forge. Where do I download to and then what. I guess in general I still don't know what to do with modules.
Also, do you know of any links that I can see what it looks like?
I have tried to implement the {startExpandCollapse}{stopExpandCollapse} and although I can make it work I don't think it is the answer that I am looking for, I think the client may have problems writing the content in.
Can you explain to me how the Questions Module works? It is fairly vague in the Forge. Where do I download to and then what. I guess in general I still don't know what to do with modules.
Also, do you know of any links that I can see what it looks like?
Re: template using JS expanding and contracting content
My advice is always try in local environment if match that you want.Tracy wrote: Regarding the suggested Questions Module;
I have tried to implement the {startExpandCollapse}{stopExpandCollapse} and although I can make it work I don't think it is the answer that I am looking for, I think the client may have problems writing the content in.
Can you explain to me how the Questions Module works? It is fairly vague in the Forge. Where do I download to and then what. I guess in general I still don't know what to do with modules.
Also, do you know of any links that I can see what it looks like?
Install xampp and cmsms or a preinstalled 1.2.2
Install module via ModuleManager or follow link module (in prev post), download and install
Alby