Jump to content

output Textarea-Field without a-Tags


Recommended Posts

i use a textarea-field with CKEditor. its filled with text which has a link.

this field is in two of my templates. the first template is an article and everything is finde. the second is an index-template and textarea is placed inside a link. this causes problems.

index-template looks like this

<a href=""><?php echo $page->textarea;  ?></a>

which results in:

<a href="">
  <p>Lorem Ipsum <a href"">Test</a></p>

is there a way to output this textarea wihtout the <a> links? i don't need the link on my index-template

Link to comment
Share on other sites

Another solution...

Instead of wrapping the link around the textarea on the index template, place the link as a sibling to the textarea and then use CSS absolute positioning to place it over the textarea.


<div class="my-text">
  <a class="my-link" href=""></a>
  <?php echo $page->textarea; ?>


.my-text { position:relative; }
.my-link { position:absolute; width:100%; height:100%; top:0; left:0; z-index:2; }


  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...