How to make placeholder stretch to the information it contains?
Hello,
I have put a placeholder on my page. This contains a script which fills up this placeholder with text and a little form.
I would like to have my placeholder dynamicaly stretched so it will display alle the information the script provides.
In the event the placeholder stretches, the page should stretch with it.
Is there a way to do this?
Kind regards,
Joris
05 October 2014, 09:20 PM
Acorn
Re: How to make placeholder stretch to the information it contains?
Joris, Xara web pages are WYSIWYG so they do not have the concept of dynamically growth. There are some attempts to do this where people are typically looking for Content Management Systems.
If you right-click on your Placeholder and set its Position on page to be Stretch with page then you can length the page until your Placeholder text is fully contained in the elongated Placeholder.
It is probably better to put your Placeholder on a separate layer to make it into a pop-up and give it lots of room that way.
Acorn
06 October 2014, 10:19 AM
JorisVdB
Re: How to make placeholder stretch to the information it contains?
Hello,
Thank you for your reply but non of the above mentioned solutions work. I have put placeholder in seperate layer, put stretch with page, but the placeholder will not trigger the page to stretch, when it holds more information than there is space available. Is there a workaround possible? Suppose I would give the page more space than propably ever needed. Is it possible to let it schrink until the footer reaches the bottom line of text.
I could use iframe, but then I get scrollbars in the middle of the document. Not so nice and furthermore in this case the script is put on a seperate page and is therefore not part of the Webdesigners page and cannot exchange data with it. This is not a solution.
Greetings,
Joris
06 October 2014, 11:51 AM
xtom
Re: How to make placeholder stretch to the information it contains?
You'll need a dynamic page tweak to extend the page/footer. There's a post on xara-users forum where you can download the xar file and the vid below shows how to use it.
07 October 2014, 11:17 AM
JorisVdB
Re: How to make placeholder stretch to the information it contains?
Hello Tom,
This is really what I need, however, following the instruction on your video and this on the referred page, it does not work. The placeholder stretches and that is already something but I can't get the page to stretch. Probably I am missing something.
Does this work on all xara templates or only on responsive website templates? The footerstart placeholder refers to footer class (</div><div class="footer"><div>), do i need to include somewhere java script? It means a lot to me, because if I can get it to work I can build up my site with Webdesigner including all scripts, instead of transferring the design to script pages.
So, until I read from you, I keep on experimenting.
Kind regards,
Joris
07 October 2014, 11:36 AM
xtom
Re: How to make placeholder stretch to the information it contains?
Yes it should work with responsive and non-responsive sites. The video was done for Designer Pro 9 is a bit outdated, it refers to giving a name footerBackground but the newest version of the tweak relies on class names instead so in xara when applying the name use htmlclass=footerBackground instead of just footerBackground. Follow the instructions in the xar file over the video but the video should still be a good general guide. The footerstart/end placeholders shouldn't need to be changed, there is already the javascript in the head section of the footerstart placeholder.
07 October 2014, 12:15 PM
JorisVdB
Re: How to make placeholder stretch to the information it contains?
It seemed that one of the example footerstart placeholderd did not contained the head sectionscript. I found it in the other one and copied it.
Now it works fine. Great. I am very happy. Many thanks.
Just need to convince Xara to make it possible to save the webpages with the php extension and then everything can be done from withing Webdesigner. This would make it the best designer ever. :)
07 October 2014, 01:30 PM
xtom
Re: How to make placeholder stretch to the information it contains?
Ah yes the example is using a main and mobile variant and the javascript is only needed once in the placeholder on the main variant. Glad you got it working. :)
07 October 2014, 01:40 PM
jamesd
Re: How to make placeholder stretch to the information it contains?
Quote:
Originally Posted by JorisVdB
Just need to convince Xara to make it possible to save the webpages with the php extension and then everything can be done from withing Webdesigner. This would make it the best designer ever. :)
You can export a page with a php extension by adding .php to the page name. The only thing is you cannot change the extension of the first page to .php :)