www.webdeveloper.com
Results 1 to 2 of 2

Thread: Obtaining elements? for variables in if() functions

  1. #1
    Join Date
    Jun 2012
    Location
    UK
    Posts
    2

    Exclamation Obtaining elements? for variables in if() functions

    Below is the section of my html:

    {block:Quote}
    <div class="post quote">
    {blockate}
    <div class="date">
    <p><span class="day">{DayOfMonthWithZero}</span> {MonthNumber} / {Year}</p>
    </div>
    {/blockate}

    <div class="content">
    <blockquote cite="url">
    <p>"{Quote}"</p>
    </blockquote>
    {block:Source}
    <div class="source">{Source}</div>
    {block:Source}

    </div>

    <div class="info">
    {block:HasTags}
    <div>
    <p class="tags-label">Tags:</p>
    <ul class="tags">
    {block:Tags}<li><a href="{TagURL}">{Tag}</a></li>{/block:Tags}
    </ul>
    </div>
    {/block:HasTags}
    <p><a href="{Permalink}" target="_blank">{lang:Permalink}</a> {block:IfShowNotes}{block:NoteCount}<s
    pan class="notes">{NoteCountWithLabel}</span>{/block:NoteCount}{/block:IfShowNotes} {block:IfDisqusShortname}<span style="float: right;"><a class="dsq-comment-count" href="{Permalink}#disqus_thread">{lang:Comments}</a></span>{/block:IfDisqusShortname}</p>
    </div>
    </div>
    {/block:Quote}


    I would like to know how:

    1. To get the div classes
    2. To assign the divs (classes) to variables
    3. To get the date of my quote post
    4. To check if the date of my post quote matches the current date.
    5. To get the tag names of the post e.g "wisdom" or "power"
    6. To check if any tags name match quote of the day
    7. To get the content, text of a quote post / the whole quote itself
    8. To document write the quote provided it fulfills 4. and 6.

  2. #2
    Join Date
    Jun 2012
    Location
    UK
    Posts
    2
    *

    {block: Date}
    <div class="date">
    <p><span class="day">{DayOfMonthWithZero}</span> {MonthNumber} / {Year}</p>
    </div>
    {/block: Date}

    *

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles