Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Nov. 16, 2005 09:41:57

patrick k.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

templates & content-elements


first of all, let me introduce myself:
i´m working as a programmer/designer with vonautomatisch in vienna/austria.
i´m writing my PhD on "cooperative structures". right now, we are writing an
article called "RTFM and teach yourself" for a book about "micro-learning"
which is going to be published early 2006. for the last 6 months, i compared
different application frameworks and CMS according to their information- and
documentation-design. only 3 out of 40 frameworks meet our needs -
therefore, we are working with django, RoR and helma (www.helma.org) to find
out which one is best (for us).
we are looking for a framework for a big austrian publisher to do several
website and some intranet-stuff.


and now, my question:
i have a site with several content-items smaller than a page.

the main-template might look like this:
- header
- content-area
- sidebar

then i´d like to have some abstract, pre-defined, "child templates" (using
django-terms):
- film: assigning a film-ID, this child template should output some
information about a specific film within the content-area.
- star: assigning a star-ID, this child template should output some
information about a specific person within the content-area.
- interview: assigning a interview-ID, this child template should output
some information about a specific interview within the content-area.
... and so on (for every area of the site)

what i want to do:
the content-ares should consist of small blocks (film, star, interview ...).
the site-editor should be able to MOVE these blocks around (change the
position of the block), EDIT the block (e.g. assigning a different film-ID)
and DELETING the block. this should be done within the ADMIN-INTERFACE (not
touching any code).

i´ve been playing around with child-templates a little bit, but i have no
idea on how to accomplish that.

any help is much appreciated.

patrick

mag. phil. patrick kranzlmüller
vonautomatisch werkstaetten

kettenbrueckengasse 13/10. 1050 wien
mobil: +43 (0) 699 196 787 28
email:
www: www.vonautomatisch.at

Offline

#2 Nov. 16, 2005 10:05:58

Kenneth G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

templates & content-elements


On Wednesday 16 Nov 2005 3:11 pm, patrick k wrote:
> i´m writing my PhD on "cooperative structures". right now, we are
> writing an article called "RTFM and teach yourself" for a book about
> "micro-learning"

this is not really necessary, we help anyone on this list - except ppl
who havent passed kindergarten

--
regards
kghttp://www.livejournal.com/users/lawgontally ho!http://avsap.org.inಇಂಡ್ಲಿನಕ್ಸ வாழ்க!

Offline

#3 Nov. 16, 2005 15:39:23

Adrian H.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

templates & content-elements


On 11/16/05, patrick k <> wrote:
> the content-ares should consist of small blocks (film, star, interview ...).
> the site-editor should be able to MOVE these blocks around (change the
> position of the block), EDIT the block (e.g. assigning a different film-ID)
> and DELETING the block. this should be done within the ADMIN-INTERFACE (not
> touching any code).

Hi Patrick,

Welcome to the Django community -- thanks for the introduction. :)

What you're describing is definitely possible with Django. We've
solved that exact problem on lawrence.com and ljworld.com, which have
been powered by Django for some time now. I assume this presentation
"moving" would be limited to the home page, right? If so, here's the
strategy I'd recommend:

Create a "home page" object, which would just store the presentation
decisions for the home page for a given date/time range. This could be
editable in the admin. Then just write a view that grabs the
appropriate home page object and renders the home page.

Alternatively, if every page of your site has *separate* logic about
presentation, which is required to be editable in the admin, then
you'll want to create a "page" model, which has foreign keys to the
types of content it's displaying, a field for the URL, and fields
representing the order.

This is a bit hard to explain, but I hope this has helped.

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org

Offline

#4 Nov. 16, 2005 17:56:49

patrick k.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

templates & content-elements


i guess your implying the wrong intention here.
i didn´t want to offend anyone. sorry if i did. just wanted to give some
personal information (with relevance to my question).


>
> On Wednesday 16 Nov 2005 3:11 pm, patrick k wrote:
>> i´m writing my PhD on "cooperative structures". right now, we are
>> writing an article called "RTFM and teach yourself" for a book about
>> "micro-learning"
>
> this is not really necessary, we help anyone on this list - except ppl
> who havent passed kindergarten

Offline

#5 Nov. 16, 2005 18:19:02

patrick k.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

templates & content-elements


i see what you mean.
my ideas was somehow different though.

let´s say my content-area looks like this:

<div id="content">
<div class="contentbox_2column">
<div class="contentbox_2column_left">
{% block film %}1237{% endblock %}
</div>
<div class="contentbox_2column_right">
{% block star %}97{% endblock %}
</div>
</div>
<div class="contentbox_1column">
{% block banner %}{% endblock %}
</div>
<div class="contentbox_3column">
<div class="contentbox_3column_left">
{% block recent_entries %}{% endblock %}
</div>
<div class="contentbox_3column_middle">
<div class="title">a title</div>
<div class="subtitle">a subtitle</div>
<div class="body">some text</div>
</div>
<div class="contentbox_3column_right">
{% block star %}98{% endblock %}
</div>
</div>
</div>

with using dom4j (for example), i could walk through this document and have
an output like (very abstract now):

box 2 columns
left: filmblock: id=1237
right: starblock: id=97
box 1 column
banner
box 3 columns
left: recent_entries
middle: my own stuff
right: starblock: id=97

now this elements could for example be dragged around by using AJAX (which
would be cool, i think).

the difference to your suggestion is (if i´m right):
when an editor wants to create a NEW page (which should be possible), he/she
could simply "build" this page just by selecting content-boxes and
content-elements.

well, maybe i´m just thinking it wrong somehow, but your approach seems
limited to me.

patrick



>
> On 11/16/05, patrick k <> wrote:
>> the content-ares should consist of small blocks (film, star, interview ...).
>> the site-editor should be able to MOVE these blocks around (change the
>> position of the block), EDIT the block (e.g. assigning a different film-ID)
>> and DELETING the block. this should be done within the ADMIN-INTERFACE (not
>> touching any code).
>
> Hi Patrick,
>
> Welcome to the Django community -- thanks for the introduction. :)
>
> What you're describing is definitely possible with Django. We've
> solved that exact problem on lawrence.com and ljworld.com, which have
> been powered by Django for some time now. I assume this presentation
> "moving" would be limited to the home page, right? If so, here's the
> strategy I'd recommend:
>
> Create a "home page" object, which would just store the presentation
> decisions for the home page for a given date/time range. This could be
> editable in the admin. Then just write a view that grabs the
> appropriate home page object and renders the home page.
>
> Alternatively, if every page of your site has *separate* logic about
> presentation, which is required to be editable in the admin, then
> you'll want to create a "page" model, which has foreign keys to the
> types of content it's displaying, a field for the URL, and fields
> representing the order.
>
> This is a bit hard to explain, but I hope this has helped.
>
> Adrian
>
> --
> Adrian Holovaty
> holovaty.com | djangoproject.com | chicagocrime.org

Offline

#6 Nov. 17, 2005 04:21:10

Kenneth G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

templates & content-elements


On Wednesday 16 Nov 2005 11:26 pm, patrick k wrote:
> i guess your implying the wrong intention here.
> i didn´t want to offend anyone. sorry if i did. just wanted to give
> some personal information (with relevance to my question).

i didnt get offended - when i started reading your post, i first thought
you were conducting a survey and very nearly deleted the post without
reading the rest - and the rest was something highly relevant to me. i
just meant to say that its better on specialised lists to come directly
to the point
--
regards
kghttp://www.livejournal.com/users/lawgontally ho!http://avsap.org.inಇಂಡ್ಲಿನಕ್ಸ வாழ்க!

Offline

#7 Nov. 17, 2005 16:22:18

patrick k.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

templates & content-elements


i´d like to do something similar to TemplaVoila (used within Typo3). idon´t like Typo3 at all, but their concept of "Futuristic TemplateBuilding" is really good, i think. if anyone has an idea of how toimplement this functionality with django, please let me know.patrick

Offline

#8 Nov. 17, 2005 19:16:39

Jacob K.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

templates & content-elements


On Nov 17, 2005, at 10:21 AM, patrick kranzlmüller wrote:i´d like to do something similar to TemplaVoila (used withinTypo3). i don´t like Typo3 at all, but their concept of "FuturisticTemplate Building" is really good, i think. if anyone has an ideaof how to implement this functionality with django, please let meknow.URL?

Jacob

Offline

#9 Nov. 17, 2005 19:35:59

Eugene L.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

templates & content-elements


http://typo3.org/doc.0.html?&tx_extrepmgm_pi1=1332&cHash=d739966bddhttp://www.mcuniverse.com/TemplaVoila_-_Cheat_Sheet.1221.0.htmlhttp://www.mcuniverse.com/TemplaVoila_-_Public_Demo.1708.0.html"Jacob Kaplan-Moss" <> wrote in message


On Nov 17, 2005, at 10:21 AM, patrick kranzlmller wrote:
> id like to do something similar to TemplaVoila (used within Typo3). i
> dont like Typo3 at all, but their concept of "Futuristic Template
> Building" is really good, i think. if anyone has an idea of how to
> implement this functionality with django, please let me know.

URL?

Jacob

Offline

#10 Nov. 17, 2005 21:38:43

patrick k.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

templates & content-elements


eugene: thanks for the links.

it´s really hard for me to explain what i want - i tried it yesterday with a
code-example, but didn´t get an answer (so i thought i try a different
approach and relate to templavoila, although that might give the wrong
impression).

basic idea:
building a site with one (or more) main-template(s), content-boxes (=
sub-templates with placeholders for content-elements) and content-elements
(= outputting data from a database). you should be able to move and delete
content-boxes (with or without the content-elements) and content-elements,
and - of course - add them.
a content-element could be a film-description with an image on the left side
on one page or just a featured film-title on another page (in both cases, i
just want the site-editor to change the film-ID for changing the element).

i´m dealing with this problem for quite a while now, but - surprisingly
enough - there doesn´t seem to be a nice solution. hopefully, somebody here
knows better than me.

some related comments from the rubyonrails-wiki:
1. Allowing content items to be units smaller than a page and referenced as
a graph would allow the most flexibility, but it also appears very
complicated.
2. Also essential is that the same ContentObject can be rendered differently
in different places. Referenced as a graph would be the best way to do this.
TemplaVoila of Typo3 is a good start, but suffers from lack of a global
render context, and is (almost) strictly a tree.

patrick


>
>http://typo3.org/doc.0.html?&tx_extrepmgm_pi1=1332&cHash=d739966bdd>
>http://www.mcuniverse.com/TemplaVoila_-_Cheat_Sheet.1221.0.html>http://www.mcuniverse.com/TemplaVoila_-_Public_Demo.1708.0.html>
>
> "Jacob Kaplan-Moss" <> wrote in message
>
>
> On Nov 17, 2005, at 10:21 AM, patrick kranzlmller wrote:
>> id like to do something similar to TemplaVoila (used within Typo3). i
>> dont like Typo3 at all, but their concept of "Futuristic Template
>> Building" is really good, i think. if anyone has an idea of how to
>> implement this functionality with django, please let me know.
>
> URL?
>
> Jacob
>
>
>

Offline

Board footer

Moderator control

Enjoy the 18th of November
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support