So you could try:

.. |X| raw:: html

    type="checkbox" name="checkbox1" <?php echo $checkbox1_checked; ?>

To stick to the point,

Bernat

On Jul 16, 2:49 pm, Gabor Bernat <ber...@primeranks.net> wrote:
> Basic, image and unicode text replacement inside a table (bonus adding a
> reference to a tile, hence the ref directive):
> =============== ======================================================
>   |Beginners_7| **Title:** * :ref:`Drawing_2`
>
>                 *Author:*  |Author_BernatG|
>
>                 |X|
>
> =============== ======================================================
>
> .. |Beginners_7| image:: images/Drawing_2_Tutorial_Result_7.png
>     :height: 90pt
>     :width: 90pt
>
> .. |Author_BernatG| unicode:: Bern U+00E1 t U+0020 G U+00E1 bor
> .. |X| replace:: Like this
>
> With replacement you may even customize the look of your links:
>
> .. |IntelTBB| replace:: Intel |copy| Threading Building Blocks (*TBB*)
> .. _IntelTBB:http://threadingbuildingblocks.org/file.php?fid=77
>
> |IntelTBB|_ is used inside OpenCV for parallel code snippets. Using this
> will make sure that the OpenCV library will
> take advantage of all the cores you have in your systems CPU.
>
> Take care,
>
> Gábor Bernát
> Student - Sapientia University - Computer Science - Tîrgu-Mureș, România.
> Tel.: +40-746-217-082
>
>
>
> On Sat, Jul 16, 2011 at 13:32, Lars <lars.otte...@gmail.com> wrote:
> > I have not been able to use the replace directive successfully, can
> > you give examples of how it can be used?
> > Very interested if layout.html could run a script on body, or the
> > like.
>
> > On Jul 14, 9:26 pm, Gabor Bernat <ber...@primeranks.net> wrote:
> > > Using the replace directive should cease the need for creating multiple
> > > files,
>
> > > Gábor Bernát
> > > Student - Sapientia University - Computer Science - Tîrgu-Mureș, România.
> > > Tel.: +40-746-217-082
>
> > > On Thu, Jul 14, 2011 at 21:13, Lars <lars.otte...@gmail.com> wrote:
> > > > Not the worlds most pretty code, but I found a solution.
>
> > > > index.rst
>
> > > >  Test Scripts
> > > >  ============
>
> > > >  ================== ========================================
> > > >   Todo              Completed
> > > >  ================== ========================================
> > > >  Read Emails        .. include:: /_htmlvars/checkbox1.rst
> > > >  Check Todolist     .. include:: /_htmlvars/checkbox2.rst
> > > >  Start MyApp        .. include:: /_htmlvars/checkbox3.rst
> > > >  ================== ========================================
>
> > > > /_htmlvars/checkbox1.rst
> > > > .. raw:: html
>
> > > >   type="checkbox" name="checkbox1" <?php echo $checkbox1_checked; ?>
>
> > > > /_htmlvars/checkbox2.rst
> > > > .. raw:: html
>
> > > >   type="checkbox" name="checkbox2" <?php echo $checkbox2_checked; ?>
>
> > > > /_htmlvars/checkbox3.rst
> > > > .. raw:: html
>
> > > >   type="checkbox" name="checkbox3" <?php echo $checkbox3_checked; ?>
>
> > > > If someone figures out something more clever, let me know.
>
> > > > On Jul 14, 8:01 pm, Lars <lars.otte...@gmail.com> wrote:
> > > > > I noticed that I can add some html to document with
>
> > > > > .. raw:: html
>
> > > > >   <?php echo "myphpcode"; ?>
>
> > > > > But how do I add this to a table?
>
> > > > > On Jul 13, 12:02 pm, Lars <lars.otte...@gmail.com> wrote:
>
> > > > > > Hi,
>
> > > > > >   I have been quite happy with sphinx documentation so far, but I
> > have
> > > > > > a few questions that I was unable to find the answer for. So far I
> > > > > > learned about _templates/layout.html which has helped me quite a
> > bit,
> > > > > > making the output .php and checking for valid user. I was unable to
> > > > > > figure out how to make _sources into php files that would also
> > check
> > > > > > for valid user, so I was forced to stick with .htaccess for this
> > > > > > directory.
>
> > > > > >  Now my main issue at the moment is formatting certain text and
> > > > > > classes, I am wondering if there is options to run scripts inside
> > of
> > > > > > layout.html? One of my main interests is, adding dynamic data to
> > > > > > static data, lets say, tables and lists. If I make a table that is
> > a
> > > > > > checklist with basic steps like;
>
> > > > > >  1. Read emails
> > > > > >  2. Check todo list
> > > > > >  3. Start application X.
> > > > > >  ...
>
> > > > > >  And this table I want to add <checkbox> code, that is dynamic
> > based
> > > > > > on selected user or data. Now the php code to fetch the php
> > variables
> > > > > > data I can make quite easy, but what I am wondering about is, when
> > > > > > in .rst documents i add:
>
> > > > > > .. cssclass:: todolisttable
>
> > > > > >  ============== ================
> > > > > >    Todo                       Completed
> > > > > >  ============== ================
> > > > > >     Read Emails             ReadEmails_
> > > > > >     Check Todolist          CheckTodo_
> > > > > >     Start MyApp             StartMyApp_
> > > > > >  ============== ================
>
> > > > > > How do I make layout.html change ReadEmails_ to : <checkbox
> > > > > > name="reademails" <?php echo $reademailschecked; ?>>, as this would
> > be
> > > > > > very usefull for me.
>
> > > > > > I understand that I can make the php code to get variables if I add
> > > > > > the following to layout.html:
>
> > > > > > {% block body %}
> > > > > >         <?php echo "my php code to get variables"; ?>
> > > > > > {{ super() }}
> > > > > > {% endblock %}
>
> > > > > > And last, any suggestions in how to make the source into php files
> > > > > > would be much appreciated.
>
> > > > > > Thanks in advanced, Lars
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "sphinx-dev" group.
> > > > To post to this group, send email to sphinx-dev@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > > > sphinx-dev+unsubscr...@googlegroups.com.
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/sphinx-dev?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "sphinx-dev" group.
> > To post to this group, send email to sphinx-dev@googlegroups.com.
> > To unsubscribe from this group, send email to
> > sphinx-dev+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/sphinx-dev?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-dev@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

Reply via email to